Versions in this module Expand all Collapse all v1 v1.18.1 Nov 3, 2023 Changes in this version + type EvictCallback = func(key any, value any) + type LruCache struct + func New(options ...Option) *LruCache + func (c *LruCache) CloneTo(n *LruCache) + func (c *LruCache) Delete(key any) + func (c *LruCache) Exist(key any) bool + func (c *LruCache) Get(key any) (any, bool) + func (c *LruCache) GetWithExpire(key any) (any, time.Time, bool) + func (c *LruCache) Set(key any, value any) + func (c *LruCache) SetWithExpire(key any, value any, expires time.Time) + type Option func(*LruCache) + func WithAge(maxAge int64) Option + func WithEvict(cb EvictCallback) Option + func WithSize(maxSize int) Option + func WithStale(stale bool) Option + func WithUpdateAgeOnGet() Option