Redis Command: HVALS
Get all the values of a hash. Only the values are returned as a list. To get the keys we can use the HKEYS command. We can use the HGETALL command to get all the keys and values.
Get all the values of a hash. Only the values are returned as a list. To get the keys we can use the HKEYS command. We can use the HGETALL command to get all the keys and values.
Get the list of all fields of a hash. All the items returned, are unique as the field names are unique in a hash. If the key does not exist then we get (empty array) in response, which represents an empty array when used in any programming language.
Get all the fields and values of a hash. By only providing the key of the hash we get all the fields and values. We do not need to be aware of specific field(s). The response contains the field and value of the field in 2 separate lines.
Get the value of a single field of a hash. This is the simplest command for getting the value from a hash, but only one field can be fetched from the hash. HMGET supports multiple fields, and HGETALL returns all data of a hash. So you can use these if these commands serve your purpose.
Create a new hash and set fields, or change the existing value of field(s) of a hash. If the key does not exist then it will be created. If the field does not exist then it will be created. And if the field exists then the value will be overwritten.
Restore data from a serialized(by DUMP command) data. This command creates a key, unserializes the provided data, then stores the value for the key. The expiration time of the original key is not contained in the data, so that is not contained in the created key. RDB version and data checksum are checked before restoring data.
Serialize the value of a key, in a specific format. We can use the serialize value to later recreate/restore the value. Redis command RESTORE can be used for the restoration. The encoding format is the same as the format used for the RDB file. RDB version is also added in the encoded value.
Here are the processes to backup and restore data from and to the Redis server. Though the restore and back is not a frequently used process, but this becomes crucial in certain use cases. Also moving data from one Redis server to another is a very handy process when we need that. Here we have discussed 2 processes for the backup and restoration of the Redis server.
In this article, we have discussed all about settings and checking configurations of Redis. We have finally discussed important Redis configurations, in detail.
BLPOP extracts/pops an item from the Left/HEAD of the first non-empty list. This is a blocking operation, so if no item is available in the provided list, this command will wait.