Versions in this module Expand all Collapse all v1 v1.31.1 Nov 1, 2023 v1.31.0 Oct 20, 2023 Changes in this version + type EvictCallback func(key K, value V) + type LruCache struct + func New(options ...Option[K, V]) *LruCache[K, V] + func (c *LruCache[K, V]) Clear() error + func (c *LruCache[K, V]) CloneTo(n *LruCache[K, V]) + func (c *LruCache[K, V]) Delete(key K) + func (c *LruCache[K, V]) Exist(key K) bool + func (c *LruCache[K, V]) Get(key K) (V, bool) + func (c *LruCache[K, V]) GetWithExpire(key K) (V, time.Time, bool) + func (c *LruCache[K, V]) Set(key K, value V) + func (c *LruCache[K, V]) SetWithExpire(key K, value V, expires time.Time) + type Option func(*LruCache[K, V]) + func WithAge(maxAge int64) Option[K, V] + func WithEvict(cb EvictCallback[K, V]) Option[K, V] + func WithSize(maxSize int) Option[K, V] + func WithStale(stale bool) Option[K, V] + func WithUpdateAgeOnGet() Option[K, V]