diff --git a/cache.go b/cache.go index d86ab12..73424e5 100644 --- a/cache.go +++ b/cache.go @@ -213,6 +213,11 @@ func New(config Config) *Cache { func() { // Anon func to utilize defer cache.mutex.Lock() defer cache.mutex.Unlock() + defer func() { + if err := recover(); err != nil { + // TODO handle the error + } + }() switch update.op { case opMoveToFront: