downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Memcached::addByKey> <Memcached
[edit] Last updated: Fri, 17 May 2013

view this page in

Memcached::add

(PECL memcached >= 0.1.0)

Memcached::addAjoute un nouvel élément sous une nouvelle clé

Description

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

Memcached::add() est similaire à Memcached::set(),mais l'opération échoue si la clé key existe déjà.

Liste de paramètres

key

La clé avec laquelle stocker la valeur.

value

La valeur à stocker.

expiration

Le délai d'expiration, par défaut à zéro. Voyez délais d'expiration pour plus d'informations.

Valeurs de retour

Cette fonction retourne TRUE en cas de succès ou FALSE si une erreur survient. La méthode Memcached::getResultCode() retourne la constante Memcached::RES_NOTSTORED si la clé existe déjà.

Voir aussi



add a note add a note User Contributed Notes Memcached::add - [1 notes]
up
0
public at kevingh dot com
1 year ago
In Memcached v1.4.5, getResultCode() returns Memcached::RES_DATA_EXISTS if the key is already in use.

Otherwise Memcached::RES_SUCCESS is returned.

 
show source | credits | sitemap | contact | advertising | mirror sites