tags:

views:

128

answers:

2

Hi,

Is it possible to grab a list of memcached key based on some regex? I understand that one solution is to store the key in the database and grab the list when I need to delete those keys. This means that, it is going to incur additional cost to the db.

I was wondering if there is another way to do it without DB overhead.

Cheers, Mickey

+2  A: 

No, there's no way to do that. The documentation suggests a way to simulate a namespace, but that's it.

Jonathan Feinberg
Thanks :) I found this: http://code.google.com/p/memcached-tag/I wonder we can add_tag gradually... Any idea?
Mickey Cheong
+1  A: 

memcached is fast because it doesn't do this sort of thing.

If it did all the stuff your database could do, it'd be as fast as your database and someone would need to come along and build something with more constrained semantics that optimized for speed over functionality.

Dustin