By using prepend command, you can prepend value of the key.
Syntax
- prepend key flags exptime bytes [noreply]
- value
Example
In the given example, we are trying to add some data in a key that does not exist. Hence, NOT_STORED is returned by Memcached. After this, we set one key and prepend data into it.
- prepend tutorials 0 900 5
- redis
- NOT_STORED
- set tutorials 0 900 9
- memcached
- STORED
- get tutorials
- VALUE tutorials 0 14
- memcached
- END
- prepend tutorials 0 900 5
- redis
- STORED
- get tutorials
- VALUE tutorials 0 14
- redismemcached
- END