Redis support Persistence is only one of its weapons, in addition, it provides up to 5 data storage methods for different needs, to maximize the efficiency of your needs, the following are said:
A string (string)
String is the simplest type, you can understand the same type as memcached, a key corresponds to a value, and the operation supported on it is similar to the operation of Memcached. But it's more versatile.
Two list (doubly linked list)
List is a linked list structure, the main function is push, pop, get all the values of a range and so on. It is said to be bidirectional because it can be manipulated on the left and right sides of the list.
Three dict (hash table)
Set is a set, and we are similar to the concept of the set in mathematics, the operation of the set has added delete elements, there are multiple sets of orthogonal and poor operation. Key in operation is understood as the name of the set
Four Zset (sort set)
Zset is an upgraded version of set, and he adds a sequential attribute on the set, which can be specified when adding a modified element, and Zset automatically re-adjusts the order of the new values after each assignment. The value of the specified key can be set to sort weights, it applies the rank module more
Five hash types
Redis is able to store key data for multiple attributes (such as User1.uname USER1.PASSWD), of course, you can store these properties in JSON format, directly manipulate it as a string type, but this is performance-based, so the hash type proposed by Redis.
Redis ' five-format storage and presentation