SISMEMBER

Syntax
SISMEMBER key member
Available since:
1.0.0
Time complexity:
O(1)
ACL categories:
@read, @set, @fast,

Returns if member is a member of the set stored at key.

Examples

SADD myset "one" SISMEMBER myset "one" SISMEMBER myset "two"

RESP2/RESP3 Reply

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.

Rate this page