SISMEMBER

SISMEMBER key member
Available since:
Redis Open Source 1.0.0
Time complexity:
O(1)
ACL categories:
@read, @set, @fast,
Compatibility:
Redis Software and Redis Cloud compatibility

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

Required arguments

key

The name of the key that holds the set.

member

The member to check for.

Examples

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

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
✅ Standard
✅ Active-Active
✅ Standard
✅ Active-Active

Return information

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
Back to top ↑