v1.6.0
- Implements
func (c *Cache) LoadAndEvict(key interface{}) (interface{}, bool)
and
func (c *Cache) Pop() (key, value interface{})
.
Since the records are ordered by insertion order by default, the cache can be used as a queue. - The background loop will no longer
RLock
the records. - The background loop will only run when LFU is used or the first non-zero TTL record is stored.