Memcached::add

Add an item under a new key

&reftitle.description; public `bool` `Memcached::add` `string` `key` `mixed` `value` `int` `expiration` 0

`Memcached::add` is similar to `Memcached::set`, but the operation fails if the `key` already exists on the server.

&reftitle.parameters;

`key`

- &memcached.parameter.key;

`value`

- &memcached.parameter.value;

`expiration`

- &memcached.parameter.expiration;

&reftitle.returnvalues;

&return.success; The `Memcached::getResultCode` will return `Memcached::RES_NOTSTORED` if the key already exists.

&reftitle.seealso;

- `Memcached::addByKey`
- `Memcached::set`
- `Memcached::replace`