English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Rpushx command is used to insert a value at the end of an existing list (the rightmost end). If the list does not exist, the operation is invalid.
Basic Syntax of Redis Rpushx Command:
redis 127.0.0.1:6379> RPUSHX KEY_NAME VALUE1..VALUEN
>= 2.2.0
The length of the list after executing the Rpushx operation.
redis 127.0.0.1:6379> RPUSH mylist "hello" (integer) 1 redis 127.0.0.1:6379> RPUSH mylist "foo" (integer) 2 redis 127.0.0.1:6379> RPUSHX mylist2 "bar" (integer) 0 redis 127.0.0.1:6379> LRANGE mylist 0 -1 1) "hello" 2) "foo"