Redis ' five-format storage and presentation

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.