February 2018
Intermediate to advanced
356 pages
9h 10m
English
The following are the main commands listed with their usages:
SADD "unique-visitors" "joe" SADD "unique-visitors" "mary"
As we can see, the command returned one because we added one user each time.
SMEMBERS "unique-visitors"
The command will return joe and mary because those are the values stored in the unique-visitors key.
SCARD "unique-visitors"
The command will return the number of elements stored in the requested keys, in this case, the output will be 2.