mailgun / groupcache

Clone of golang/groupcache with TTL and Item Removal support
Apache License 2.0
484 stars 72 forks source link

Fix not update `entry.expire` in `cache` #50

Closed iwaltgen closed 1 year ago

iwaltgen commented 1 year ago

cache.Add function doesn't update the entry entry.expire if exists an entry. but entry.value already does update.

https://github.com/mailgun/groupcache/blob/df5395112d7caeaf6ee14e333953bb563c21b0ba/lru/lru.go#L65-L69

This PR also does update entry.expire.