Closed rolsim closed 9 months ago
func (c *Cache[K, V]) Range(fn func(item *Item[K, V]) bool) { c.items.mu.RLock() > if len(c.items.values) == 0 { > c.items.mu.RUnlock() > return > } for item := c.items.lru.Front(); item != c.items.lru.Back().Next(); item = item.Next() { ...
This bug has been fixed here: #118
I've just made a new release that includes this fix: https://github.com/jellydator/ttlcache/releases/tag/v3.1.1