Jdesk / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Add tags support #188

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We need to invalidate group of entries when updating to new version of our 
system. Currently it is impossible to delete sets of entries.

We need to store items with keys like this: 
key = namespace_+md5(serialize(some_request))
item = response 
so we don't know list of all keys (and this schema is pretty common) but when 
data format is changed in request OR in response we need to invalidate all 
caches.

Add optional argument when adding or setting new values with TAG.

Delete keys by TAG.

Maybe you can just refresh/refactor/fix this 
http://code.google.com/p/memcached-tag/ and include it in code base?

Original issue reported on code.google.com by grzegorz...@gmail.com on 23 Feb 2011 at 12:01

GoogleCodeExporter commented 9 years ago
You can do this with key namespaces as described in the wiki; tag support has 
been discussed and we haven't seen an efficient enough implementation to use.

In short; since memcached is clustered it's impossible to do tagging without 
also clustering all related keys on one server, which isn't necessarily a good 
thing.

Original comment by dorma...@rydia.net on 15 Apr 2011 at 7:09

GoogleCodeExporter commented 9 years ago
Can you show me how to invalidate multiple items without knowing the keys?

Original comment by grzegorz...@gmail.com on 15 Apr 2011 at 9:05

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/memcached/wiki/NewProgrammingTricks#Namespacing

Original comment by dsalli...@gmail.com on 15 Apr 2011 at 9:57