(PECL memcached >= 0.1.0)
Memcached::replace — Replace the item under an existing key
Memcached::replace() is similar to
Memcached::set(), but the operation fails if the
key
does not exist on the server.
如果成功則回傳 TRUE
,失敗則回傳 FALSE
。
The Memcached::getResultCode() will return
Memcached::RES_NOTSTORED
if the key does not exist.