Description
Description | S.NO | Command | Description |
|---|---|---|
| 1 | LLEN key | Get the length of a list |
| 2 | LPOP | Remove and get the first element in a list |
| 3 | LPUSH key value1 | Prepend one or multiple values to a list |
| 4 | LPUSH key value | Prepend a value to a list |
| 5 | LREM key count stop | Get a range of elements from a list |
| 6 | LSET key index value | Set the values of an elements in a list by its index |
| 7 | LTRIM key start stop | Set the values of an element in a list by its index |
| 8 | RPOP key | Remove and get the last element in a list |
| 9 | RPUSH key value1 | Append one or multiple values to a list |
| 10 | RPUSHX key values | Append a value to a list, only if the list exists |
| 11 | LINDEX key index | Get an element from a list by its index |
| 12 | BRPOP key1[key2] timeout | Remove and get the last element in a list, or block until one is available |
| 13 | BRPOPLPUSH source destination timeout | POP a value from a list, push it to another list and return it. |
Examples
Key Points