Redis stores data in the form of
Value can be any
hashes or any
hashes allow you the mapping of key and value pairs. key and value are strings only. So, you can store the object type of data. It is similar to the HashMap data structure in the java language.
That means You can store the value as an object.
For example, In applications, you have a coded user object that contains the id, name, and salary in the program.
to cache users’ data, you can use value as user object in Redis.
Redis Hashes Commands
|SET key value||Assign the value to the key|
|GET key||Retrieve the value for the given key|
|DEL key||Deletes the given key and value from a cache|