Module Hub Beta

PREPEND

key value

Prepends value to the string in key.

If key does not exist it is created and set as an empty string, so PREPEND will be similar to SET in this special case.

Return Value

Integer reply: the length of the string after the operation.

Examples

redis> SET mykey ” World”
OK
redis> PREPEND mykey Hello
(integer) 11
redis> GET mykey
“Hello World”

© 2017 Redis Labs, Inc. All rights reserved.