Redis -- data type [1]

A string type (the simplest and most commonly used type)

String is the most basic type of redis, you can understand it as the exact same type as Memcached, a key corresponds to a value.




Two Hash types (hash)

Redis hash is a mapping table of field and value of string type, and hash is especially suitable for storing objects.




Three List (list)

Redis lists are simple lists of strings, sorted by insertion  order . You can add an element to the head (left) or tail (right) of the list.



Four set (unordered set)

Redis's Set is an  unordered collection of string type




Five zsets (ordered sets)

Redis zset, like set, is also a collection of elements of type string, and does not allow duplicate members.
The difference is that each element is associated with a fraction of type double. Redis sorts the members of the set from small to large through scores.






Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325687552&siteId=291194637