redis Redis List Datatype

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

The List datatype in Redis is an ordered collection of items referenced by a Redis key. Redis allows you to access and modify a list by index or push/pop operations. In Redis, the two ends of a list are referred to as the left and the right. The left corresponds to the first element or head of a list and the right coresponds to the last element or tail of a list.

Syntax

  • LPUSH key value [value ...]
  • RPUSH key value [value ...]
  • LPOP key
  • RPOP key
  • LLEN key

Remarks

More detail on the List datatype and all the commands that can be used in conjunction with them can be found in the official Redis documentation at Redis.io.



Got any redis Question?