From cf0198ac7d92634998b3f3f2b616553fda07d7b0 Mon Sep 17 00:00:00 2001 From: Durand Fabrice Date: Thu, 4 Jan 2018 09:39:16 -0500 Subject: [PATCH] Also added in GetWithExpiration --- cache.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cache.go b/cache.go index 35aa7dd..91a72e8 100644 --- a/cache.go +++ b/cache.go @@ -152,6 +152,7 @@ func (c *cache) GetWithExpiration(k string) (interface{}, time.Time, bool) { if item.Expiration > 0 { if time.Now().UnixNano() > item.Expiration { c.mu.RUnlock() + c.Delete(k) return nil, time.Time{}, false }