mailgun / groupcache

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

fix cache size on updating value #51

Closed xgamtx closed 1 year ago

xgamtx commented 1 year ago

Fix couple of bugs:

  1. if update value in cache, cache size will increase on size of new value instead of difference between previous and new one;
  2. if update value in cache, expiration time won't change
xgamtx commented 1 year ago

@thrawn01, Hi! Could you help me with fixing check problems?

thrawn01 commented 1 year ago

Thank you so much for your PR, I'm so sorry this took so long to review. Since it's been so long I would feel bad requesting changes to this PR, so I will close this issue in favor of a slightly different approach.

Part of this issue was fixed by #52 which has been merged. The second issue 2. if update value in cache, expiration time won't change I addressed in #56