English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Redis Lpushx inserts a value at the beginning of an existing list. The operation is invalid if the list does not exist.
Basic Syntax of redis Lpushx Command
redis 127.0.0.1:6379> LPUSHX KEY_NAME VALUE1.. VALUEN
>= 2.2.0
The length of the list after LPUSHX command execution.
127.0.0.1:6379> LPUSH list1 "foo" (integer) 1 127.0.0.1:6379> LPUSHX list1 "bar" (integer) 2 127.0.0.1:6379> LPUSHX list2 "bar" (integer) 0 127.0.0.1:6379> LRANGE list1 0 -1 1) "bar" 2) "foo"