Memcached::touch

(PECL memcached >= 2.0.0)

Memcached::touchアイテムに新しい有効期限を設定する

説明

public Memcached::touch(string $key, int $expiration = 0): bool

Memcached::touch() は、指定したキーに新しい有効期限を設定します。

パラメータ

key

値の格納先のキー。

expiration

期限切れとなるまでの時間。デフォルトは 0。詳細な情報は有効期限 を参照ください。

戻り値

成功した場合に true を、失敗した場合に false を返します。 必要に応じて Memcached::getResultCode() を使用しましょう。

参考

add a note add a note

User Contributed Notes 2 notes

up
5
Dehumanizer
8 years ago
With PHP 5.4.41 and memcached 1.4.24 it works in ASCII mode as well.
up
5
Pramod Patil
9 years ago
This is only supported when binary protocol is enabled.
$obj = new Memcached();
$obj->setOption(\Memcached::OPT_BINARY_PROTOCOL, true);
To Top