Versions in this module Expand all Collapse all v1 v1.1.0 May 31, 2023 Changes in this version + func New(expiration time.Duration) *cache[T] + type Cache interface + DeleteExpired func() + Get func(key T) (interface{}, bool) + Set func(key T, value interface{}) + StartCollecting func(ctx context.Context, interval time.Duration) + WaitForTermination func() + type MockCache struct + func NewMockCache(ctrl *gomock.Controller) *MockCache[T] + func (m *MockCache[T]) DeleteExpired() + func (m *MockCache[T]) EXPECT() *MockCacheMockRecorder[T] + func (m *MockCache[T]) Get(key T) (interface{}, bool) + func (m *MockCache[T]) Set(key T, value interface{}) + func (m *MockCache[T]) StartCollecting(ctx context.Context, interval time.Duration) + func (m *MockCache[T]) WaitForTermination() + type MockCacheMockRecorder struct + func (mr *MockCacheMockRecorder[T]) DeleteExpired() *gomock.Call + func (mr *MockCacheMockRecorder[T]) Get(key interface{}) *gomock.Call + func (mr *MockCacheMockRecorder[T]) Set(key, value interface{}) *gomock.Call + func (mr *MockCacheMockRecorder[T]) StartCollecting(ctx, interval interface{}) *gomock.Call + func (mr *MockCacheMockRecorder[T]) WaitForTermination() *gomock.Call