mailgun / groupcache

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

fix: group.Set() not updating hot cache for all nodes #69

Open xWiiLLz opened 5 months ago

xWiiLLz commented 5 months ago

When there are more than 2 nodes, the hotCache is never updated when using the Set() method. Added a test which triggers the bug (you can test it by removing the accompanying fix done in groupcache.go).

However, it does look to me like the hotCache param in the Set method is misleading: the hot caches are used even if the provided arg is false, which would then yield out-of-date values to the other nodes 🤔