Redis SetsRedis Sets are an unordered collection of unique strings. Unique strings means there is not a single string repeated in the set. In Redis set add, remove, and test for the existence of members in O(1) (constant time regardless of the number of elements contained inside the Set). The maximum length of a list is more than 4 billion of elements per set. EXAMPLEIn the above example, you can see that we have added 4 elements in the set by using SADD command. But only 3 elements are retrieved by using SMEMBERS command because one element was duplticate and Redis sets read duplicate values only once. Redis Sets Commands
Next TopicRedis Sorted Sets |