(PECL memcached >= 2.0.0)
Memcached::touchByKey — Set a new expiration on an item on a specific server
$server_key
, string $key
, int $expiration
): bool
Memcached::touchByKey() is functionally equivalent to
Memcached::touch(), except that the free-form
server_key
can be used to map the
key
to a specific server.
server_key
本鍵名用于識別儲存和讀取值的服務(wù)器。沒(méi)有將實(shí)際的鍵名散列到具體的項目,而是在決定與哪一個(gè) memcached 服務(wù)器通信時(shí)將其散列為服務(wù)器鍵名。這使得關(guān)聯(lián)的項目在單一的服務(wù)上被組合起來(lái)以提高多重操作的效率。
key
用于存儲值的鍵名。
expiration
到期時(shí)間,默認為 0。 更多信息請參見(jiàn)到期時(shí)間。
成功時(shí)返回 true
, 或者在失敗時(shí)返回 false
。
如需要則使用 Memcached::getResultCode()。