Memcached
PHP Manual

Memcached::replaceByKey

(PECL memcached >= 0.1.0)

Memcached::replaceByKeyReplace the item under an existing key on a specific server

Описание

public bool Memcached::replaceByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )

Memcached::replaceByKey() is functionally equivalent to Memcached::replace, except that the free-form server_key can be used to map the key to a specific server. This is useful if you need to keep a bunch of related keys on a certain server.

Параметри

server_key

Ключът, идентифициращ сървъра, на който да се съхранява стойността.

key

Ключът, под който да се съхрани стойността.

value

Стойността за записване.

expiration

Срокът на валидност, по подразбиране е 0. Вж. Срок на валидност за повече информация.

Връщани стойности

Връща TRUE при успех или FALSE при неуспех. The Memcached::getResultCode will return Memcached::RES_NOTSTORED if the key does not exist.

Вж. също


Memcached
PHP Manual