Is there anyway to retrieve all keys that start with a particular string in redis?
I want to do something like storing:
'thing1:userid1' : ' ';
'thing1:userid2' : ' ';
'thing2:userid1' : ' ';
'thing2:userid2' : ' ';
and retrieve every thing1 without having to know every user.
However, you might want to consider using a map.
Do be careful with this in production. Redis can only process one command at a time, and KEYS is very slow. It has to look at every key in the entire database.