Redis Hashes
# Redis Hash
A Redis hash is a mapping table of string-type fields and values. Hashes are especially suitable for storing objects.
In Redis, each hash can store up to 232 - 1 key-value pairs (over 4 billion).
### Example
127.0.0.1:6379> HMSET tutorialkey name "redis tutorial" description "redis basic commands for caching" likes 20 visitors 23000 OK 127.0.0.1:6379> HGETALL tutorialkey 1) "name"2) "redis tutorial"3) "description"4) "redis basic commands for caching"5) "likes"6) "20"7) "visitors"8) "23000"
In the example above, we stored some descriptive information about Redis (name, description, likes, visitors) into the hash table **tutorialkey**.
* * *
## Redis Hash Commands
The following table lists basic Redis hash-related commands:
| No. | Command and Description |
| --- | --- |
| 1 | [HDEL key field1 ](#) Deletes one or more hash fields |
| 2 | (#) Determines whether a specified field exists in the hash stored at key |
| 3 | (#) Gets the value associated with field in the hash stored at key |
| 4 | (#) Returns all fields and values of the hash stored at key |
| 5 | (#) Increments the integer value of a hash field by the given number |
| 6 | (
YouTip