(PECL memcached >= 0.1.0)
Memcached::add — Add an item under a new key
Memcached::add() is similar to
Memcached::set(), but the operation fails if the
key already exists on the server.
keyA chave sobre a qual guardar o valor.
valueO valor para guardar.
expirationO tempo de expiração, padrão é 0. Veja Tempos de Expiração para maiores informações.
Retorna TRUE em caso de sucesso ou FALSE em caso de falha.
The Memcached::getResultCode() will return
Memcached::RES_NOTSTORED if the key already exists.