Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AxelPrel committed Jun 27, 2024
1 parent 836d048 commit a613de3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit a613de3

Please sign in to comment.