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.