diff --git a/common/cache/lru.go b/common/cache/lru.go index 81020f661a6..058fa0b80b3 100644 --- a/common/cache/lru.go +++ b/common/cache/lru.go @@ -221,6 +221,9 @@ func (c *lru) Delete(key interface{}) { // Release decrements the ref count of a pinned element. func (c *lru) Release(key interface{}) { + if !c.pin { + return + } c.mut.Lock() defer c.mut.Unlock()