Data Types
The default is map - key value store. Then there is Set, that can be used to implement a dictionary. Set is to be used for fast membership checks and multi-set arithmetics (O(n) performance).
Key-value Map
Set
Key is name of a set. All set commands have S prefix.
Add an item into set.
SADD key memberReturns all items from a set.
SMEMBERS keyReturns 1 if member is contained in a set, 0 otherwise.
SISMEMBER key memberGet the cardinality (size) of set.
SCARD keyWe can do set arithmetics, like union, intersection and difference.
SUNION
SINTER
SDIFSorted Set
Set sorted by a score, descending.
List
TODO:
Last updated
Was this helpful?