Determines whether a member belongs to a set.
SISMEMBER
key
member
Returns if member
is a member of the set stored at
key
.
One of the following:
Integer reply:
0
if the element is not a member of the set, or when the
key does not exist.
Integer reply:
1
if the element is a member of the set.
O(1)
@fast @read @set
127.0.0.1:6379> SADD myset "one"
(integer) 1
127.0.0.1:6379> SISMEMBER myset "one"
(integer) 1
127.0.0.1:6379> SISMEMBER myset "two"
(integer) 0
SADD, SCARD, SDIFF, SDIFFSTORE, SINTER, SINTERCARD, SINTERSTORE, SMEMBERS, SMISMEMBER, SMOVE, SPOP, SRANDMEMBER, SREM, SSCAN, SUNION, SUNIONSTORE.