APPEND

Apply for Redis Developer Course Redis Regular Inspection / Technical Support Redis Enterprise Server

Store / append

Appends a value to an existing key, or stores it like SET when the key does not exist.

Example

Command>set key1 Hello
Result>OK
Command>append key1 Redis
Result>10
Command>get key1
Result>HelloRedis
Command>append key2 "Hello World"   If the key does not already exist, the data is stored.
Result>11
Command>get key2
Result>Hello World

View animation


Syntax

APPEND key value

  • Available since version 2.0.0.
  • Time complexity is O(1).
Related commands SET
Clients for Java Jedis, Lettuce, Redisson
Clients for C Hiredis

<< MSETNX APPEND APPENDS >>

Email 답글이 올라오면 이메일로 알려드리겠습니다.