How to delete multiple keys which match a regex
In my php script I want to delete all membase keys which match the regex search-*
The use case is:
1. I have a type ahead search
2. everytime a keyboard charecter is pressed in the search box I send the query to the sql server which returns the result and the results are also saved in membase with the key "search-md5(sql)"
3. When a new node is created I want to cleanup all keys saved as search-*
4. So that the new node can show up in the search results immediately.
My current solution is to flush the membase but this is negatively impacting performance.
Thanks,
Vikas
How does this function work:
http://code.google.com/appengine/docs/python/memcache/clientclass.html#C...
Seems like memcache server does expose this ?
Vikas
Groupsense - Social way to get things done
Thanks Vikas.
There's no out-of-the-box functionality to do this today, but the underlying infrastructure is there. We will be building up this functionality over the next few releases.
Today you can use the TAP interface: http://wiki.membase.org/display/membase/TAP+Protocol to iterate over the entire key space and then use that to trigger deletes based upon matching a regular expression.
Doesn't quite do exactly what you wanted, but sounds like it should get you about halfway there.
Perry
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!