Memcached append 命令

append 在已有值末尾追加数据。

Beginner
Key Pointsappend/prepend 在值尾部/头部拼接,适合累积日志、拼接列表。

用法

Shell
set log 0 0 3
abc
append log 0 0 2
d
get log
Output
STORED
STORED
VALUE log 0 5
abcd
END
append/prepend just concatenates strings without parsing; flag and TTL are unchanged. Repeatedly appending grows a big key — watch size and network cost.

Friends & Partners