Redis Lists: RPUSH
RPUSH key value1 [value2]
Redis RPUSH command is used to insert all the specified values at the tail of the list stored at key. It is created as an empty list before performing the push operation if the key does not exist. An error is returned when key holds such a value that is not a list.
Syntax:
RPUSH KEY_NAME VALUE1..VALUEN
Available since
1.0.0.
Return Value
Integer reply, the length of the list after the push operation.
Return Value Type
Integer
Example: Redis RPUSH
127.0.0.1:6379> RPUSH mycolor1 white black (integer) 2 127.0.0.1:6379> RPUSH mycolor1 red blue (integer) 4 127.0.0.1:6379> LRANGE mycolor1 0 -1 1) "white" 2) "black" 3) "red" 4) "blue"
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework