Versions in this module Expand all Collapse all v3 v3.0.0 Feb 20, 2024 Changes in this version + type Cache interface + Add func(key K, value V) bool + Contains func(key K) (ok bool) + DeleteExpired func() + Get func(key K) (V, bool) + GetExpiration func(key K) (time.Time, bool) + GetOldest func() (K, V, bool) + Invalidate func(key K) + InvalidateFn func(fn func(key K) bool) + Keys func() []K + Len func() int + Peek func(key K) (V, bool) + Purge func() + Remove func(key K) bool + RemoveOldest func() (K, V, bool) + Resize func(int) int + Set func(key K, value V, ttl time.Duration) + Stat func() Stats + Values func() []V + func NewCache[K comparable, V any]() Cache[K, V] + type Stats struct + Added int + Evicted int + Hits int + Misses int Other modules containing this package github.com/go-pkgz/expirable-cache github.com/go-pkgz/expirable-cache/v2