?
This document uses PHP Chinese website manual Release
Memcached add 命令用于將 value(數(shù)據(jù)值) 存儲(chǔ)在指定的 key(鍵) 中。
如果 add 的 key 已經(jīng)存在,則不會(huì)更新數(shù)據(jù),之前的值將仍然保持相同,并且您將獲得響應(yīng) NOT_STORED。
add 命令的基本語(yǔ)法格式如下:
add key flags exptime bytes [noreply] value
參數(shù)說(shuō)明如下:
以下實(shí)例中我們?cè)O(shè)置:
add new_key 0 900 10 data_value STORED get new_key VALUE new_key 0 10 data_value END
如果數(shù)據(jù)添加成功,則輸出:
STORED
輸出信息說(shuō)明: