SCARD key
Returns the set cardinality (number of elements) of the set stored at key
.
Integer reply: the cardinality (number of elements) of the set, or 0
if key
does not exist.
(integer) 1
redis> SADD myset "World" (integer) 1
redis> SCARD myset (integer) 2
© 2009–2018 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/scard