aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gitea.com/go-chi/cache/memory.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gitea.com/go-chi/cache/memory.go')
-rw-r--r--vendor/gitea.com/go-chi/cache/memory.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/gitea.com/go-chi/cache/memory.go b/vendor/gitea.com/go-chi/cache/memory.go
index 2d5a8fac4d..7b470e9fc5 100644
--- a/vendor/gitea.com/go-chi/cache/memory.go
+++ b/vendor/gitea.com/go-chi/cache/memory.go
@@ -116,8 +116,10 @@ func (c *MemoryCacher) IsExist(key string) bool {
c.lock.RLock()
defer c.lock.RUnlock()
- _, ok := c.items[key]
- return ok
+ if item, ok := c.items[key]; ok {
+ return !item.hasExpired()
+ }
+ return false
}
// Flush deletes all cached data.