Saturday, 11 April 2015

Redis sets


Redis Sets are unordered collections of strings. Sets don't allow duplicate values.
hk@hk-Inspiron-N5010:~$ redis-cli 
127.0.0.1:6379> sadd empIds 1 2 5 6 3 4 
(integer) 6 
127.0.0.1:6379> smembers empIds 
1) "1" 
2) "2" 
3) "3" 
4) "4" 
5) "5" 
6) "6" 


Redis sets won't maintain the order, that means it don't give the elements the way you inserted.


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment