Documentation ¶
Index ¶
- type FakeCache
- func (m *FakeCache[T]) Close()
- func (m *FakeCache[T]) Delete(key string)
- func (m *FakeCache[T]) Get(key string) (T, bool)
- func (m *FakeCache[T]) ItemCount() int
- func (m *FakeCache[T]) Set(key string, value T, cost uint64, expiresInSeconds int64) error
- func (m *FakeCache[T]) SetWithDefaultTTL(key string, value T, cost uint64) error
- type FakeCacheItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeCache ¶
type FakeCache[T any] struct { GetCalls int SetCalls int SuccessfulGetCalls int FailedGetCalls int // contains filtered or unexported fields }
MockCache is a simple map-based cache usable in tests without using a real cache.
func NewFakeCache ¶
type FakeCacheItem ¶
Click to show internal directories.
Click to hide internal directories.