From a613de3d8381bd2c4de96cebbf691cc16f3b2b35 Mon Sep 17 00:00:00 2001 From: Axel PREL Date: Thu, 27 Jun 2024 12:29:55 +0200 Subject: [PATCH] fix #59 --- cache.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cache.go b/cache.go index c7e8b9f..73c6b9c 100644 --- a/cache.go +++ b/cache.go @@ -254,7 +254,9 @@ func (c *Cache[K, V]) DeleteExpired() { c.cache.Delete(key) return true } - c.expManager.update(key, expiration) + if _, ok := c.cache.Get(key); ok { + c.expManager.update(key, expiration) + } return false }