summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/lpushx.md
blob: e98c9037d707b2b2b845cf6a039290a3e462c03c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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.

@examples

```cli
LPUSH mylist "World"
LPUSHX mylist "Hello"
LPUSHX myotherlist "Hello"
LRANGE mylist 0 -1
LRANGE myotherlist 0 -1
```