SCARD key
Available since: 1.0.0
Time complexity: O(1)
ACL categories:
@read
@set
@fast
Returns the set cardinality (number of elements) of the set stored at key
.
@return
@integer-reply: the cardinality (number of elements) of the set, or 0
if key
does not exist.
@examples
redis> SADD myset "Hello"
TBD
redis> SADD myset "World"
TBD
redis> SCARD myset