Versions in this module Expand all Collapse all v1 v1.0.0 Sep 28, 2026 Changes in this version + type Cache interface + Close func() + DeleteExpired func() + Get func(key Key) (V, bool) + Hash func(data []byte) Key + Invalidate func(key Key) + InvalidateFn func(fn func(key Key) bool) + Keys func() []Key + Len func() int + Peek func(key Key) (V, bool) + Purge func() + RemoveOldest func() + Set func(key Key, value V, ttl time.Duration) + SetDefault func(key Key, value V) + Stat func() Stats + func New[V any]() Cache[V] + type HasherFn func(data []byte) Key + type Key struct + Hi uint64 + Lo uint64 + func DefaultHasher(data []byte) Key + type Options interface + Start func() Cache[V] + WithCleanupInterval func(interval time.Duration) Cache[V] + WithClockInterval func(interval time.Duration) Cache[V] + WithDefaultTTL func(ttl time.Duration) Cache[V] + WithHasher func(fn HasherFn) Cache[V] + WithMaxKeys func(maxKeys int) Cache[V] + WithOnEvicted func(fn func(key Key, value V)) Cache[V] + type SingleFlightRing struct + func NewSingleFlightRing[V any]() *SingleFlightRing[V] + func (g *SingleFlightRing[V]) Do(key Key, fn func() (V, error)) (V, error) + type Stats struct + Evictions int64 + Expired int64 + Hits int64 + Misses int64