Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = store.ErrNotFound
ErrNotFound indicates that key not found in the cache.
Functions ¶
This section is empty.
Types ¶
type Cache ¶ added in v0.0.4
type Cache[KeyType comparable, ValueType any] interface { Get(KeyType) (ValueType, error) Set(KeyType, ValueType) error Delete(KeyType) error Clear() error GetWithContext(context.Context, KeyType) (ValueType, error) SetWithContext(context.Context, KeyType, ValueType) error DeleteWithContext(context.Context, KeyType) error ClearWithContext(context.Context) error UseStats() ResetStats() Stats() (stats.Stats, bool) }
Cache represents the interface for all caches
Click to show internal directories.
Click to hide internal directories.