redis HLEN command
Translation results:
length
英[leŋθ] 美[leŋθ]
n.Length, long; the length of time; (language) sound length; a paragraph, a section
Plural: lengths
redis HLEN commandsyntax
Function: Returns the number of fields in the hash table key.
Syntax: HLEN key
Time complexity: O(1)
Return: The number of fields in the hash table. When key does not exist, return 0.
redis HLEN commandexample
redis> HSET db redis redis.com (integer) 1 redis> HSET db mysql mysql.com (integer) 1 redis> HLEN db (integer) 2 redis> HSET db mongodb mongodb.org (integer) 1 redis> HLEN db (integer) 3