Redis Set SISMEMBER Command
The Redis SISMEMBER command checks if a given element is a member of the set.
Syntax
The basic syntax of the SISMEMBER command is as follows:
1 | SISMEMBER key member |
It returns if member is a member of the set stored at key.
Available Since
Redis version >= 1.0.0
Time Complexity
O(1)
ACL Categories
@read, @set, @fast
Return Value
0if the element is not a member of the set, or when the key does not exist.1if the element is a member of the set.
Example
1 | 127.0.0.1:6379> SADD key1 a b c d |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Johnson Lin!


