summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/rpushx.md
blob: 0345367efd3937f011216eb9b53118c9ebc659aa (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 tail of the list stored at `key`, only if `key`
already exists and holds a list. In contrary to `RPUSH`, 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
RPUSH mylist "Hello"
RPUSHX mylist "World"
RPUSHX myotherlist "World"
LRANGE mylist 0 -1
LRANGE myotherlist 0 -1
```