diff --git a/cache.go b/cache.go index 7fec2b6..bbc936a 100644 --- a/cache.go +++ b/cache.go @@ -853,8 +853,8 @@ func (c *cache) DeleteExpired() { } // Sets an (optional) function that is called with the key and value when an -// item is evicted from the cache. (Including when it is deleted manually.) -// Set to nil to disable. +// item is evicted from the cache. (Including when it is deleted manually, but +// not when it is overwritten.) Set to nil to disable. func (c *cache) OnEvicted(f func(string, interface{})) { c.mu.Lock() defer c.mu.Unlock()