Redis Command Reference (c) List lists related

Source: Internet
Author: User

This article summarizes the related operations functions for list lists in Redis:

Thinking: You can use the list as a stack, which can be used to solve a lot of problems.

First, Lpush

Second, Rpush

Third, Lpop

Iv. Rpop

Wu, Lrange

>rpush lover Lover1 (integer)1> Lrange Lover0-1   //List all scopes1)"Lover1"> Rpush lover Lover2//Add after list(integer)2>rpush lover Lover3 (integer)3> Lpush lover Tuizi//Join before list(integer)4>Lpush lover Nancy (integer)5> Lrange Lover0-11)"Nancy"2)"Tuizi"3)"Lover1"4)"Lover2"5)"Lover3"> Lpop Lover//To stack from a list header"Nancy"> Rpop Lover//stack from the tail of the list"Lover3"> Lrange Lover0 2   //list interval Values1)"Nancy"2)"Tuizi"3)"Lover1"

Redis Command Reference (c) List lists related

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.