Wednesday, 7 August 2013

What REDIS dataStructure to USe

What REDIS dataStructure to USe

I need to store User connection in redis
UserId - int
UserConnection <can be more than one>
IsConnected- bool
UserConnection
ConnectionId -string
UserAgent -string
ConnectedTime -DateTime
I am thinking to use Hash Set with List but not sure value of hasset can
be set to a list. something like
HSET userid1 userId:1 IsConnected:false Userconnection:<somehowaddlist of
UserConnection>
is this possible to do or is there a better way to do this in Redis? I
just started looking at redis this week.

No comments:

Post a Comment