APPEND

Since 1.1.0Strings

Syntax

APPEND key value
  • Flags: fast, write
  • ACL categories: @fast, @string, @write
  • Arity: 3

Appends value to the string at key. A missing key is created with value. The key's expiry, if it has one, is kept.

Reply

  • The length of the string afterwards.
  • A WRONGTYPE error if the key is not a string.

Examples

> SET k hello
OK
> APPEND k " world"
(integer) 11
> GET k
"hello world"