I'm new to Redis and I’m trying to work out which data type is right to store a set of data specific to one user.
The data set would be specific to, say, user 1000 and therefore I might call the type
1000:MatchesMembers
The data type would then hold a list of other users like:
1001, photo, age, name, location, city, country
1003, photo, age, name, location, city, country
1007, photo, age, name, location, city, country
1009, photo, age, name, location, city, country
I have read that hash types are the best to use if possible - Redis set vs hash
If the hash is the best to use, is this how I use it?
var hash = client.GetHash<string>("1000:MatchesMembers");
hash.SetValue("key", "value");
Do I have to set each value individually or can they be set in bulk?
Finally is it possible to pop values out of the hash? I will take around 10 entries each time and would like to remove them once I use them. Is there a way to pop entries off the hash or do I need to read and delete? Would a different data type better suit this functionality?
Thank you very much.