Memcached::touch

(PECL memcached >= 2.0.0)

Memcached::touchSet a new expiration on an item

설명

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

Memcached::touch() sets a new expiration value on the given key.

인수

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