SADD
Adds one or more members to the set stored atkey. Members that already belong to the set are ignored. If key does not exist, a new set is created.
Syntax: SADD key member [member ...]
SREM
Removes one or more members from the set stored atkey. Members that are not in the set are silently ignored.
Syntax: SREM key member [member ...]
SMEMBERS
Returns all members of the set stored atkey. Because sets are unordered, the order of members in the response is not guaranteed.
Syntax: SMEMBERS key
The order of elements returned by
SMEMBERS is not deterministic. If you need a stable order, sort the result in your application layer.SISMEMBER
Tests whethermember belongs to the set stored at key.
Syntax: SISMEMBER key member
1 if the member exists in the set, 0 if it does not (or if the key does not exist).
SCARD
Returns the cardinality (number of members) of the set stored atkey.
Syntax: SCARD key
0 if the key does not exist.