Memcached::touchByKey

(PECL memcached >= 2.0.0)

Memcached::touchByKeySet a new expiration on an item on a specific server

說明

public bool Memcached::touchByKey ( string $server_key , string $key , int $expiration )

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

本鍵名用於識別儲存和讀取值的伺服器。沒有將實際的鍵雜湊到具體的項目,而是在決定與哪一個 memcached 伺服器通信時將其雜湊為伺服器鍵值。這使得關連的項目在單一伺服上被組合起來以提高多重操作的效率。

key

用於儲存值的鍵名。

expiration

到期時間,預設為 0。 更多訊息參見到期時間

回傳值

如果成功則回傳 TRUE,失敗則回傳 FALSE。 如需要則使用 Memcached::getResultCode()

參見

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top