- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for onEvict (0.03 sec)
-
internal/lru/lru.go
func NewLRU[K comparable, V any](size int, onEvict EvictCallback[K, V], ttl time.Duration) *LRU[K, V] { if size < 0 { size = 0 } if ttl <= 0 { ttl = noEvictionTTL } res := LRU[K, V]{ ttl: ttl, size: size, evictList: NewList[K, V](), items: make(map[K]*Entry[K, V]), onEvict: onEvict, done: make(chan struct{}), } // initialize the buckets
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Apr 25 08:22:26 UTC 2025 - 12.5K bytes - Viewed (0)