blob: 4cc505f1f063cc640e87ce18754a62b93d7911b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Inserts specified values at the head of the list stored at `key`, only if `key`
already exists and holds a list. In contrary to `LPUSH`, no operation will be
performed when `key` does not yet exist.
@return
@integer-reply: the length of the list after the push operation.
@history
- `>= 4.0`: Accepts multiple `element` arguments. In Redis versions older than
4.0 it was possible to push a single value per command.
@examples
```cli
LPUSH mylist "World"
LPUSHX mylist "Hello"
LPUSHX myotherlist "Hello"
LRANGE mylist 0 -1
LRANGE myotherlist 0 -1
```
|