SCARD
Syntax
SCARD key
- Available since:
- 1.0.0
- Time complexity:
- O(1)
- ACL categories:
-
@read
,@set
,@fast
,
返回存储在key
中的集合的基数(元素数量)。
示例
RESP2 回复
Integer reply: the cardinality (number of elements) of the set, or0
if the key does not exist.
SCARD key
@read
,
@set
,
@fast
,
返回存储在key
中的集合的基数(元素数量)。
0
if the key does not exist.