GroupCache (https://github.com/golang/groupcache ) is a caching and cache-filling library, intended as a replacement for memcached in many cases. Does somebody have done some research on the source code and have a good understanding its principles or implementation? Does GroupCache support explicit cache eviction like memcached delete? Why?
From the README
:
does not support versioned values. If key "foo" is value "bar", key "foo" must always be "bar". There are neither cache expiration times, nor explicit cache evictions. Thus there is also no CAS, nor Increment/Decrement.
Groupcache is laid out for performance and has the concept of super hot items, which are mirrored throughout a peer group.
If explicit cache eviction was supported, super hot items would have to be deleted from all instances which is unpractical because it would have a very bad performance impact on the overall system because it would have to lock the primary cache line of each and every peer in the system.
For specifics on the design decisions behind Groupcache you could post in golang-nuts and ask Brad Fitzpatrick (author) directly.