Documentation
¶
Index ¶
- Variables
- type Cache
- func (c *Cache[K, V]) Add(key K, value V, ttl time.Duration) (bool, error)
- func (c *Cache[K, V]) Get(key K) (V, error)
- func (c *Cache[K, V]) Keys(prefix K) []K
- func (c *Cache[K, V]) Pop(key K) (V, error)
- func (c *Cache[K, V]) Remove(keys ...K) error
- func (c *Cache[K, V]) Set(key K, value V, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = cache.ErrNotFound
ErrNotFound is an alias for cache.ErrNotFound so existing callers using inmem.ErrNotFound keep working.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.