
How Etsy caches: hashing, Ketama, and cache smearing - micahgoulart
https://codeascraft.com/2017/11/30/how-etsy-caches/
======
stevekemp
Cache smearing seems like it would suffer from the obvious problem of
invalidation. The solution they come up with is rather than having a piece of
data associated with one cache key "foo" it is associated with "foo0, foo1,
foo.., foo8".

If you have one key you can just delete it, but now you have to do that on all
the possible versions of the key.

(Of course if they're relying upon TTL settings for expiration then this
doesn't matter.)

~~~
metabrew
if you delete the key near the code that sets/smears it, it's easy to just
delete the range of keys: key1, key2, key3.. as needed

You can send all such commands to memcached at once, so you don't suffer more
than one round-trip to multi-delete.

