Hello all, I’m new to aerospike, originally we’re using redis as distributed cache solution but it has a poor cluster solution becuse of single threaded architecture. So our Director wanted to try aerospike. Our application has a DeleteByRegex method which deletes items in cache by matching keys by given regex. I must implement this behaviour for Aerospike. I read about “scan method” and “creating a second bin with key data then create secondary indexes on it” but I’m not sure about it. So how can I find keys that match by given regex? then using this keys to delete items.
Additional data: We are using aerospike on RAM and we don’t need to persist it to a file. We must use cluster architecture (which is cool in aerospike) DeleteByRegex is one of our core methods so i need to implement it.
Thanks for your time & help
EDIT: I want to give an example I have following key values
- p_1516_price_usd -> 15
- p_1516_price_try -> 26
- p_1516_shortDescription_en -> bla bla in English
- p_1516_shortDescription_es -> bla bla in Spanish
Sometimes I want to delete all info about a product so I match for “p_1516*”
Sometimes Price will be enough so Imatch for “p_1516_price*”
Thats my case.