redis SMEMBERS command
Translation results:
member
UK[ˈmembə(r)] US[ˈmɛmbɚ]
n. Member; molecule; body part (especially arm or leg); component , parts
plural: members
redis SMEMBERS commandsyntax
Function: Return all members in the collection key. Keys that do not exist are treated as empty sets.
Syntax: SMEMBERS key
Available versions: >= 1.0.0
Time complexity: O(N), N is the cardinality of the set.
Return: All members in the collection.
redis SMEMBERS commandexample
# key 不存在或集合为空 redis> EXISTS not_exists_key (integer) 0 redis> SMEMBERS not_exists_key (empty list or set) # 非空集合 redis> SADD language Ruby Python Clojure (integer) 3 redis> SMEMBERS language 1) "Python" 2) "Ruby" 3) "Clojure"