jellydator / ttlcache

An in-memory cache with item expiration and generics
MIT License
883 stars 115 forks source link

`Range` panics when cache is empty #116

Closed zix99 closed 7 months ago

zix99 commented 8 months ago

Test code:

cache := ttlcache.New[string, string]()
cache.Range(func(item *ttlcache.Item[string, string]) bool {
  return false
})
swithek commented 8 months ago

Thanks for reporting this @zix99. It should be fixed sometime soon.