| Methods |
public
|
__construct(string $persistent_id = '', callable $on_new_object_cb = null, string $connection_str = '')
(PECL memcached >= 0.1.0)<br/>
Create a Memcached instance
(PECL memcached >= 0.1.0)
Create a Memcached instance
Parameters
| $persistent_id |
[optional]
|
| $on_new_object_cb |
[optional]
|
| $connection_str |
[optional]
|
|
#
|
public
|
getResultCode(): int
(PECL memcached >= 0.1.0)<br/>
Return the result code of the last operation
(PECL memcached >= 0.1.0)
Return the result code of the last operation
Returns
Result code of the last Memcached operation.
|
#
|
public
|
getResultMessage(): string
(PECL memcached >= 1.0.0)<br/>
Return the message describing the result of the last operation
(PECL memcached >= 1.0.0)
Return the message describing the result of the last operation
Returns
Message describing the result of the last Memcached operation.
|
#
|
public
|
get(string $key, callable $cache_cb = null, int $flags = 0): mixed
(PECL memcached >= 0.1.0)<br/>
Retrieve an item
(PECL memcached >= 0.1.0)
Retrieve an item
Parameters
| $key |
The key of the item to retrieve.
|
| $cache_cb |
[optional]
Read-through caching callback or NULL.
|
| $flags |
[optional]
The flags for the get operation.
|
Returns
the value stored in the cache or FALSE otherwise.
The Memcached::getResultCode will return
Memcached::RES_NOTFOUND if the key does not exist.
|
#
|
public
|
getByKey(string $server_key, string $key, callable $cache_cb = null, int $flags = 0): mixed
(PECL memcached >= 0.1.0)<br/>
Retrieve an item from a specific server
(PECL memcached >= 0.1.0)
Retrieve an item from a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key of the item to fetch.
|
| $cache_cb |
[optional]
Read-through caching callback or NULL
|
| $flags |
[optional]
The flags for the get operation.
|
Returns
the value stored in the cache or FALSE otherwise.
The Memcached::getResultCode will return
Memcached::RES_NOTFOUND if the key does not exist.
|
#
|
public
|
getMulti(array $keys, int $flags = 0): mixed
(PECL memcached >= 0.1.0)<br/>
Retrieve multiple items
(PECL memcached >= 0.1.0)
Retrieve multiple items
Parameters
| $keys |
Array of keys to retrieve.
|
| $flags |
[optional]
The flags for the get operation.
|
Returns
the array of found items or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
getMultiByKey(string $server_key, array $keys, int $flags = 0): array|false
(PECL memcached >= 0.1.0)<br/>
Retrieve multiple items from a specific server
(PECL memcached >= 0.1.0)
Retrieve multiple items from a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $keys |
Array of keys to retrieve.
|
| $flags |
[optional]
The flags for the get operation.
|
Returns
the array of found items or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
getDelayed(array $keys, bool $with_cas = null, callable $value_cb = null): bool
(PECL memcached >= 0.1.0)<br/>
Request multiple items
(PECL memcached >= 0.1.0)
Request multiple items
Parameters
| $keys |
Array of keys to request.
|
| $with_cas |
[optional]
Whether to request CAS token values also.
|
| $value_cb |
[optional]
The result callback or NULL.
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
getDelayedByKey(string $server_key, array $keys, bool $with_cas = null, callable $value_cb = null): bool
(PECL memcached >= 0.1.0)<br/>
Request multiple items from a specific server
(PECL memcached >= 0.1.0)
Request multiple items from a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $keys |
Array of keys to request.
|
| $with_cas |
[optional]
Whether to request CAS token values also.
|
| $value_cb |
[optional]
The result callback or NULL.
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
fetch(): array|false
(PECL memcached >= 0.1.0)<br/>
Fetch the next result
(PECL memcached >= 0.1.0)
Fetch the next result
Returns
the next result or FALSE otherwise.
The Memcached::getResultCode will return
Memcached::RES_END if result set is exhausted.
|
#
|
public
|
fetchAll(): array|false
(PECL memcached >= 0.1.0)<br/>
Fetch all the remaining results
(PECL memcached >= 0.1.0)
Fetch all the remaining results
Returns
the results or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
set(string $key, mixed $value, int $expiration = 0, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Store an item
(PECL memcached >= 0.1.0)
Store an item
Parameters
| $key |
The key under which to store the value.
|
| $value |
The value to store.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
setByKey(string $server_key, string $key, mixed $value, int $expiration = 0, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Store an item on a specific server
(PECL memcached >= 0.1.0)
Store an item on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key under which to store the value.
|
| $value |
The value to store.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
touch(string $key, int $expiration = 0): bool
(PECL memcached >= 2.0.0)<br/>
Set a new expiration on an item
(PECL memcached >= 2.0.0)
Set a new expiration on an item
Parameters
| $key |
The key under which to store the value.
|
| $expiration |
The expiration time, defaults to 0. See Expiration Times for more info.
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
touchByKey(string $server_key, string $key, int $expiration): bool
(PECL memcached >= 2.0.0)<br/>
Set a new expiration on an item on a specific server
(PECL memcached >= 2.0.0)
Set a new expiration on an item on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key under which to store the value.
|
| $expiration |
The expiration time, defaults to 0. See Expiration Times for more info.
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
setMulti(array $items, int $expiration = 0, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Store multiple items
(PECL memcached >= 0.1.0)
Store multiple items
Parameters
| $items |
An array of key/value pairs to store on the server.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
setMultiByKey(string $server_key, array $items, int $expiration = 0, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Store multiple items on a specific server
(PECL memcached >= 0.1.0)
Store multiple items on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $items |
An array of key/value pairs to store on the server.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
cas(float $cas_token, string $key, mixed $value, int $expiration = 0, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Compare and swap an item
(PECL memcached >= 0.1.0)
Compare and swap an item
Parameters
| $cas_token |
Unique value associated with the existing item. Generated by memcache.
|
| $key |
The key under which to store the value.
|
| $value |
The value to store.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_DATA_EXISTS if the item you are trying
to store has been modified since you last fetched it.
|
#
|
public
|
casByKey(float $cas_token, string $server_key, string $key, mixed $value, int $expiration = 0, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Compare and swap an item on a specific server
(PECL memcached >= 0.1.0)
Compare and swap an item on a specific server
Parameters
| $cas_token |
Unique value associated with the existing item. Generated by memcache.
|
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key under which to store the value.
|
| $value |
The value to store.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_DATA_EXISTS if the item you are trying
to store has been modified since you last fetched it.
|
#
|
public
|
add(string $key, mixed $value, int $expiration = 0, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Add an item under a new key
(PECL memcached >= 0.1.0)
Add an item under a new key
Parameters
| $key |
The key under which to store the value.
|
| $value |
The value to store.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTSTORED if the key already exists.
|
#
|
public
|
addByKey(string $server_key, string $key, mixed $value, int $expiration = 0, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Add an item under a new key on a specific server
(PECL memcached >= 0.1.0)
Add an item under a new key on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key under which to store the value.
|
| $value |
The value to store.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTSTORED if the key already exists.
|
#
|
public
|
append(string $key, string $value): bool
(PECL memcached >= 0.1.0)<br/>
Append data to an existing item
(PECL memcached >= 0.1.0)
Append data to an existing item
Parameters
| $key |
The key under which to store the value.
|
| $value |
The string to append.
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTSTORED if the key does not exist.
|
#
|
public
|
appendByKey(string $server_key, string $key, string $value): bool
(PECL memcached >= 0.1.0)<br/>
Append data to an existing item on a specific server
(PECL memcached >= 0.1.0)
Append data to an existing item on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key under which to store the value.
|
| $value |
The string to append.
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTSTORED if the key does not exist.
|
#
|
public
|
prepend(string $key, string $value): bool
(PECL memcached >= 0.1.0)<br/>
Prepend data to an existing item
(PECL memcached >= 0.1.0)
Prepend data to an existing item
Parameters
| $key |
The key of the item to prepend the data to.
|
| $value |
The string to prepend.
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTSTORED if the key does not exist.
|
#
|
public
|
prependByKey(string $server_key, string $key, string $value): bool
(PECL memcached >= 0.1.0)<br/>
Prepend data to an existing item on a specific server
(PECL memcached >= 0.1.0)
Prepend data to an existing item on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key of the item to prepend the data to.
|
| $value |
The string to prepend.
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTSTORED if the key does not exist.
|
#
|
public
|
replace(string $key, mixed $value, int $expiration = null, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Replace the item under an existing key
(PECL memcached >= 0.1.0)
Replace the item under an existing key
Parameters
| $key |
The key under which to store the value.
|
| $value |
The value to store.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTSTORED if the key does not exist.
|
#
|
public
|
replaceByKey(string $server_key, string $key, mixed $value, int $expiration = null, int $udf_flags = 0): bool
(PECL memcached >= 0.1.0)<br/>
Replace the item under an existing key on a specific server
(PECL memcached >= 0.1.0)
Replace the item under an existing key on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key under which to store the value.
|
| $value |
The value to store.
|
| $expiration |
[optional]
The expiration time, defaults to 0. See Expiration Times for more info.
|
| $udf_flags |
[optional]
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTSTORED if the key does not exist.
|
#
|
public
|
delete(string $key, int $time = 0): bool
(PECL memcached >= 0.1.0)<br/>
Delete an item
(PECL memcached >= 0.1.0)
Delete an item
Parameters
| $key |
The key to be deleted.
|
| $time |
[optional]
The amount of time the server will wait to delete the item.
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTFOUND if the key does not exist.
|
#
|
public
|
deleteMulti(array $keys, int $time = 0): array
(PECL memcached >= 2.0.0)<br/>
Delete multiple items
(PECL memcached >= 2.0.0)
Delete multiple items
Parameters
| $keys |
The keys to be deleted.
|
| $time |
[optional]
The amount of time the server will wait to delete the items.
|
Returns
Returns array indexed by keys and where values are indicating whether operation succeeded or not.
The Memcached::getResultCode will return
Memcached::RES_NOTFOUND if the key does not exist.
|
#
|
public
|
deleteByKey(string $server_key, string $key, int $time = 0): bool
(PECL memcached >= 0.1.0)<br/>
Delete an item from a specific server
(PECL memcached >= 0.1.0)
Delete an item from a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key to be deleted.
|
| $time |
[optional]
The amount of time the server will wait to delete the item.
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTFOUND if the key does not exist.
|
#
|
public
|
deleteMultiByKey(string $server_key, array $keys, int $time = 0): bool
(PECL memcached >= 2.0.0)<br/>
Delete multiple items from a specific server
(PECL memcached >= 2.0.0)
Delete multiple items from a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $keys |
The keys to be deleted.
|
| $time |
[optional]
The amount of time the server will wait to delete the items.
|
Returns
TRUE on success or FALSE on failure.
The Memcached::getResultCode will return
Memcached::RES_NOTFOUND if the key does not exist.
|
#
|
public
|
increment(string $key, int $offset = 1, int $initial_value = 0, int $expiry = 0): int|false
(PECL memcached >= 0.1.0)<br/>
Increment numeric item's value
(PECL memcached >= 0.1.0)
Increment numeric item's value
Parameters
| $key |
The key of the item to increment.
|
| $offset |
[optional]
The amount by which to increment the item's value.
|
| $initial_value |
[optional]
The value to set the item to if it doesn't currently exist.
|
| $expiry |
[optional]
The expiry time to set on the item.
|
Returns
new item's value on success or FALSE on failure.
|
#
|
public
|
decrement(string $key, int $offset = 1, int $initial_value = 0, int $expiry = 0): int|false
(PECL memcached >= 0.1.0)<br/>
Decrement numeric item's value
(PECL memcached >= 0.1.0)
Decrement numeric item's value
Parameters
| $key |
The key of the item to decrement.
|
| $offset |
[optional]
The amount by which to decrement the item's value.
|
| $initial_value |
[optional]
The value to set the item to if it doesn't currently exist.
|
| $expiry |
[optional]
The expiry time to set on the item.
|
Returns
item's new value on success or FALSE on failure.
|
#
|
public
|
incrementByKey(string $server_key, string $key, int $offset = 1, int $initial_value = 0, int $expiry = 0): int|false
(PECL memcached >= 2.0.0)<br/>
Increment numeric item's value, stored on a specific server
(PECL memcached >= 2.0.0)
Increment numeric item's value, stored on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key of the item to increment.
|
| $offset |
[optional]
The amount by which to increment the item's value.
|
| $initial_value |
[optional]
The value to set the item to if it doesn't currently exist.
|
| $expiry |
[optional]
The expiry time to set on the item.
|
Returns
new item's value on success or FALSE on failure.
|
#
|
public
|
decrementByKey(string $server_key, string $key, int $offset = 1, int $initial_value = 0, int $expiry = 0): int|false
(PECL memcached >= 2.0.0)<br/>
Decrement numeric item's value, stored on a specific server
(PECL memcached >= 2.0.0)
Decrement numeric item's value, stored on a specific server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
| $key |
The key of the item to decrement.
|
| $offset |
[optional]
The amount by which to decrement the item's value.
|
| $initial_value |
[optional]
The value to set the item to if it doesn't currently exist.
|
| $expiry |
[optional]
The expiry time to set on the item.
|
Returns
item's new value on success or FALSE on failure.
|
#
|
public
|
addServer(string $host, int $port, int $weight = 0): bool
(PECL memcached >= 0.1.0)<br/>
Add a server to the server pool
(PECL memcached >= 0.1.0)
Add a server to the server pool
Parameters
| $host |
The hostname of the memcache server. If the hostname is invalid, data-related
operations will set
Memcached::RES_HOST_LOOKUP_FAILURE result code.
|
| $port |
The port on which memcache is running. Usually, this is
11211.
|
| $weight |
[optional]
The weight of the server relative to the total weight of all the
servers in the pool. This controls the probability of the server being
selected for operations. This is used only with consistent distribution
option and usually corresponds to the amount of memory available to
memcache on that server.
|
Returns
TRUE on success or FALSE on failure.
|
#
|
public
|
addServers(array $servers): bool
(PECL memcached >= 0.1.1)<br/>
Add multiple servers to the server pool
(PECL memcached >= 0.1.1)
Add multiple servers to the server pool
Returns
TRUE on success or FALSE on failure.
|
#
|
public
|
getServerList(): array
(PECL memcached >= 0.1.0)<br/>
Get the list of the servers in the pool
(PECL memcached >= 0.1.0)
Get the list of the servers in the pool
Returns
The list of all servers in the server pool.
|
#
|
public
|
getServerByKey(string $server_key): array
(PECL memcached >= 0.1.0)<br/>
Map a key to a server
(PECL memcached >= 0.1.0)
Map a key to a server
Parameters
| $server_key |
The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
|
Returns
an array containing three keys of host,
port, and weight on success or FALSE
on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
resetServerList(): bool
(PECL memcached >= 2.0.0)<br/>
Clears all servers from the server list
(PECL memcached >= 2.0.0)
Clears all servers from the server list
Returns
TRUE on success or FALSE on failure.
|
#
|
public
|
quit(): bool
(PECL memcached >= 2.0.0)<br/>
Close any open connections
(PECL memcached >= 2.0.0)
Close any open connections
Returns
TRUE on success or FALSE on failure.
|
#
|
public
|
getStats(string $type = null): array|false
(PECL memcached >= 0.1.0)<br/>
Get server pool statistics
(PECL memcached >= 0.1.0)
Get server pool statistics
Parameters
| $type |
items, slabs, sizes ...
|
Returns
Array of server statistics, one entry per server.
|
#
|
public
|
getVersion(): array
(PECL memcached >= 0.1.5)<br/>
Get server pool version info
(PECL memcached >= 0.1.5)
Get server pool version info
Returns
Array of server versions, one entry per server.
|
#
|
public
|
getAllKeys(): array|false
(PECL memcached >= 2.0.0)<br/>
Gets the keys stored on all the servers
(PECL memcached >= 2.0.0)
Gets the keys stored on all the servers
Returns
the keys stored on all the servers on success or FALSE on failure.
|
#
|
public
|
flush(int $delay = 0): bool
(PECL memcached >= 0.1.0)<br/>
Invalidate all items in the cache
(PECL memcached >= 0.1.0)
Invalidate all items in the cache
Parameters
| $delay |
[optional]
Numer of seconds to wait before invalidating the items.
|
Returns
TRUE on success or FALSE on failure.
Use Memcached::getResultCode if necessary.
|
#
|
public
|
getOption(int $option): mixed
(PECL memcached >= 0.1.0)<br/>
Retrieve a Memcached option value
(PECL memcached >= 0.1.0)
Retrieve a Memcached option value
Parameters
| $option |
One of the Memcached::OPT_* constants.
|
Returns
the value of the requested option, or FALSE on
error.
|
#
|
public
|
setOption(int $option, mixed $value): bool
(PECL memcached >= 0.1.0)<br/>
Set a Memcached option
(PECL memcached >= 0.1.0)
Set a Memcached option
Returns
TRUE on success or FALSE on failure.
|
#
|
public
|
setOptions(array $options): bool
(PECL memcached >= 2.0.0)<br/>
Set Memcached options
(PECL memcached >= 2.0.0)
Set Memcached options
Parameters
| $options |
An associative array of options where the key is the option to set and
the value is the new value for the option.
|
Returns
TRUE on success or FALSE on failure.
|
#
|
public
|
setSaslAuthData(string $username, string $password): void
(PECL memcached >= 2.0.0)<br/>
Set the credentials to use for authentication
(PECL memcached >= 2.0.0)
Set the credentials to use for authentication
Parameters
| $username |
The username to use for authentication.
|
| $password |
The password to use for authentication.
|
|
#
|
public
|
isPersistent(): bool
(PECL memcached >= 2.0.0)<br/>
Check if a persitent connection to memcache is being used
(PECL memcached >= 2.0.0)
Check if a persitent connection to memcache is being used
Returns
true if Memcache instance uses a persistent connection, false otherwise.
|
#
|
public
|
isPristine(): bool
(PECL memcached >= 2.0.0)<br/>
Check if the instance was recently created
(PECL memcached >= 2.0.0)
Check if the instance was recently created
Returns
the true if instance is recently created, false otherwise.
|
#
|
public
|
flushBuffers(): bool
Flush and send buffered commands
Flush and send buffered commands
|
#
|
public
|
setEncodingKey(string $key): bool
Sets AES encryption key (libmemcached 1.0.6 and higher)
Sets AES encryption key (libmemcached 1.0.6 and higher)
|
#
|
public
|
getLastDisconnectedServer(): array|false
Returns the last disconnected server. Was added in 0.34 according to libmemcached's Changelog
Returns the last disconnected server. Was added in 0.34 according to libmemcached's Changelog
|
#
|
public
|
getLastErrorErrno(): int
Returns the last error errno that occurred
Returns the last error errno that occurred
|
#
|
public
|
getLastErrorCode(): int
Returns the last error code that occurred
Returns the last error code that occurred
|
#
|
public
|
getLastErrorMessage(): string
Returns the last error message that occurred
Returns the last error message that occurred
|
#
|
public
|
setBucket(array $host_map, array $forward_map, int $replicas): bool
Sets the memcached virtual buckets
Sets the memcached virtual buckets
|
#
|
| Constants |
public
|
OPT_COMPRESSION = -1001
<p>Enables or disables payload compression. When enabled,
item values longer than a certain threshold (currently 100…
Enables or disables payload compression. When enabled,
item values longer than a certain threshold (currently 100 bytes) will be
compressed during storage and decompressed during retrieval
transparently.
Type: boolean, default: TRUE.
|
#
|
public
|
OPT_COMPRESSION_TYPE = -1004
|
#
|
public
|
OPT_PREFIX_KEY = -1002
<p>This can be used to create a "domain" for your item keys. The value
specified here will be prefixed to each of the…
This can be used to create a "domain" for your item keys. The value
specified here will be prefixed to each of the keys. It cannot be
longer than 128 characters and will reduce the
maximum available key size. The prefix is applied only to the item keys,
not to the server keys.
Type: string, default: "".
|
#
|
public
|
OPT_SERIALIZER = -1003
<p>
Specifies the serializer to use for serializing non-scalar values.
The valid serializers are <b>Memcached:…
Specifies the serializer to use for serializing non-scalar values.
The valid serializers are Memcached::SERIALIZER_PHP
or Memcached::SERIALIZER_IGBINARY. The latter is
supported only when memcached is configured with
--enable-memcached-igbinary option and the
igbinary extension is loaded.
Type: integer, default: Memcached::SERIALIZER_PHP.
|
#
|
public
|
HAVE_IGBINARY = false
<p>Indicates whether igbinary serializer support is available.</p>
<p>Type: boolean.</p>
Indicates whether igbinary serializer support is available.
Type: boolean.
|
#
|
public
|
HAVE_JSON = false
<p>Indicates whether JSON serializer support is available.</p>
<p>Type: boolean.</p>
Indicates whether JSON serializer support is available.
Type: boolean.
|
#
|
public
|
HAVE_MSGPACK = false
<p>Indicates whether msgpack serializer support is available.</p>
<p>Type: boolean.</p>
Available as of Memcached 3.0.0.
Indicates whether msgpack serializer support is available.
Type: boolean.
Available as of Memcached 3.0.0.
|
#
|
public
|
HAVE_ENCODING = false
<p>Indicate whether set_encoding_key is available</p>
<p>Type: boolean.</p>
Indicate whether set_encoding_key is available
Type: boolean.
|
#
|
public
|
HAVE_SESSION = true
Feature support
|
#
|
public
|
HAVE_SASL = false
|
#
|
public
|
OPT_HASH = 2
<p>Specifies the hashing algorithm used for the item keys. The valid
values are supplied via <b>Memcached::HASH_*</b>…
Specifies the hashing algorithm used for the item keys. The valid
values are supplied via Memcached::HASH_* constants.
Each hash algorithm has its advantages and its disadvantages. Go with the
default if you don't know or don't care.
Type: integer, default: Memcached::HASH_DEFAULT
|
#
|
public
|
HASH_DEFAULT = 0
<p>The default (Jenkins one-at-a-time) item key hashing algorithm.</p>
The default (Jenkins one-at-a-time) item key hashing algorithm.
|
#
|
public
|
HASH_MD5 = 1
<p>MD5 item key hashing algorithm.</p>
MD5 item key hashing algorithm.
|
#
|
public
|
HASH_CRC = 2
<p>CRC item key hashing algorithm.</p>
CRC item key hashing algorithm.
|
#
|
public
|
HASH_FNV1_64 = 3
<p>FNV1_64 item key hashing algorithm.</p>
FNV1_64 item key hashing algorithm.
|
#
|
public
|
HASH_FNV1A_64 = 4
<p>FNV1_64A item key hashing algorithm.</p>
FNV1_64A item key hashing algorithm.
|
#
|
public
|
HASH_FNV1_32 = 5
<p>FNV1_32 item key hashing algorithm.</p>
FNV1_32 item key hashing algorithm.
|
#
|
public
|
HASH_FNV1A_32 = 6
<p>FNV1_32A item key hashing algorithm.</p>
FNV1_32A item key hashing algorithm.
|
#
|
public
|
HASH_HSIEH = 7
<p>Hsieh item key hashing algorithm.</p>
Hsieh item key hashing algorithm.
|
#
|
public
|
HASH_MURMUR = 8
<p>Murmur item key hashing algorithm.</p>
Murmur item key hashing algorithm.
|
#
|
public
|
OPT_DISTRIBUTION = 9
<p>Specifies the method of distributing item keys to the servers.
Currently supported methods are modulo and consistent…
Specifies the method of distributing item keys to the servers.
Currently supported methods are modulo and consistent hashing. Consistent
hashing delivers better distribution and allows servers to be added to
the cluster with minimal cache losses.
Type: integer, default: Memcached::DISTRIBUTION_MODULA.
|
#
|
public
|
DISTRIBUTION_MODULA = 0
<p>Modulo-based key distribution algorithm.</p>
Modulo-based key distribution algorithm.
|
#
|
public
|
DISTRIBUTION_CONSISTENT = 1
<p>Consistent hashing key distribution algorithm (based on libketama).</p>
Consistent hashing key distribution algorithm (based on libketama).
|
#
|
public
|
DISTRIBUTION_VIRTUAL_BUCKET = 6
|
#
|
public
|
OPT_LIBKETAMA_COMPATIBLE = 16
<p>Enables or disables compatibility with libketama-like behavior. When
enabled, the item key hashing algorithm is set…
Enables or disables compatibility with libketama-like behavior. When
enabled, the item key hashing algorithm is set to MD5 and distribution is
set to be weighted consistent hashing distribution. This is useful
because other libketama-based clients (Python, Ruby, etc.) with the same
server configuration will be able to access the keys transparently.
It is highly recommended to enable this option if you want to use
consistent hashing, and it may be enabled by default in future
releases.
Type: boolean, default: FALSE.
|
#
|
public
|
OPT_LIBKETAMA_HASH = 17
|
#
|
public
|
OPT_TCP_KEEPALIVE = 32
|
#
|
public
|
OPT_BUFFER_WRITES = 10
<p>Enables or disables buffered I/O. Enabling buffered I/O causes
storage commands to "buffer" instead of being sent.…
Enables or disables buffered I/O. Enabling buffered I/O causes
storage commands to "buffer" instead of being sent. Any action that
retrieves data causes this buffer to be sent to the remote connection.
Quitting the connection or closing down the connection will also cause
the buffered data to be pushed to the remote connection.
Type: boolean, default: FALSE.
|
#
|
public
|
OPT_BINARY_PROTOCOL = 18
<p>Enable the use of the binary protocol. Please note that you cannot
toggle this option on an open connection.</p>
<p…
Enable the use of the binary protocol. Please note that you cannot
toggle this option on an open connection.
Type: boolean, default: FALSE.
|
#
|
public
|
OPT_NO_BLOCK = 0
<p>Enables or disables asynchronous I/O. This is the fastest transport
available for storage functions.</p>
<p>Type:…
Enables or disables asynchronous I/O. This is the fastest transport
available for storage functions.
Type: boolean, default: FALSE.
|
#
|
public
|
OPT_TCP_NODELAY = 1
<p>Enables or disables the no-delay feature for connecting sockets (may
be faster in some environments).</p>
<p>Type:…
Enables or disables the no-delay feature for connecting sockets (may
be faster in some environments).
Type: boolean, default: FALSE.
|
#
|
public
|
OPT_SOCKET_SEND_SIZE = 4
<p>The maximum socket send buffer in bytes.</p>
<p>Type: integer, default: varies by platform/kernel
configuration.</p>
The maximum socket send buffer in bytes.
Type: integer, default: varies by platform/kernel
configuration.
|
#
|
public
|
OPT_SOCKET_RECV_SIZE = 5
<p>The maximum socket receive buffer in bytes.</p>
<p>Type: integer, default: varies by platform/kernel
configuration.<…
The maximum socket receive buffer in bytes.
Type: integer, default: varies by platform/kernel
configuration.
|
#
|
public
|
OPT_CONNECT_TIMEOUT = 14
<p>In non-blocking mode this set the value of the timeout during socket
connection, in milliseconds.</p>
<p>Type:…
In non-blocking mode this set the value of the timeout during socket
connection, in milliseconds.
Type: integer, default: 1000.
|
#
|
public
|
OPT_RETRY_TIMEOUT = 15
<p>The amount of time, in seconds, to wait until retrying a failed
connection attempt.</p>
<p>Type: integer, default: 0…
The amount of time, in seconds, to wait until retrying a failed
connection attempt.
Type: integer, default: 0.
|
#
|
public
|
OPT_SEND_TIMEOUT = 19
<p>Socket sending timeout, in microseconds. In cases where you cannot
use non-blocking I/O this will allow you to still…
Socket sending timeout, in microseconds. In cases where you cannot
use non-blocking I/O this will allow you to still have timeouts on the
sending of data.
Type: integer, default: 0.
|
#
|
public
|
OPT_RECV_TIMEOUT = 20
<p>Socket reading timeout, in microseconds. In cases where you cannot
use non-blocking I/O this will allow you to still…
Socket reading timeout, in microseconds. In cases where you cannot
use non-blocking I/O this will allow you to still have timeouts on the
reading of data.
Type: integer, default: 0.
|
#
|
public
|
OPT_POLL_TIMEOUT = 8
<p>Timeout for connection polling, in milliseconds.</p>
<p>Type: integer, default: 1000.</p>
Timeout for connection polling, in milliseconds.
Type: integer, default: 1000.
|
#
|
public
|
OPT_CACHE_LOOKUPS = 6
<p>Enables or disables caching of DNS lookups.</p>
<p>Type: boolean, default: <b>FALSE</b>.</p>
Enables or disables caching of DNS lookups.
Type: boolean, default: FALSE.
|
#
|
public
|
OPT_SERVER_FAILURE_LIMIT = 21
<p>Specifies the failure limit for server connection attempts. The
server will be removed after this many continuous…
Specifies the failure limit for server connection attempts. The
server will be removed after this many continuous connection
failures.
Type: integer, default: 0.
|
#
|
public
|
OPT_AUTO_EJECT_HOSTS = 28
|
#
|
public
|
OPT_HASH_WITH_PREFIX_KEY = 25
|
#
|
public
|
OPT_NOREPLY = 26
|
#
|
public
|
OPT_SORT_HOSTS = 12
|
#
|
public
|
OPT_VERIFY_KEY = 13
|
#
|
public
|
OPT_USE_UDP = 27
|
#
|
public
|
OPT_NUMBER_OF_REPLICAS = 29
|
#
|
public
|
OPT_RANDOMIZE_REPLICA_READ = 30
|
#
|
public
|
OPT_CORK = 31
|
#
|
public
|
OPT_REMOVE_FAILED_SERVERS = 35
|
#
|
public
|
OPT_DEAD_TIMEOUT = 36
|
#
|
public
|
OPT_SERVER_TIMEOUT_LIMIT = 37
|
#
|
public
|
OPT_MAX = 38
|
#
|
public
|
OPT_IO_BYTES_WATERMARK = 23
|
#
|
public
|
OPT_IO_KEY_PREFETCH = 24
|
#
|
public
|
OPT_IO_MSG_WATERMARK = 22
|
#
|
public
|
OPT_LOAD_FROM_FILE = 34
|
#
|
public
|
OPT_SUPPORT_CAS = 7
|
#
|
public
|
OPT_TCP_KEEPIDLE = 33
|
#
|
public
|
OPT_USER_DATA = 11
|
#
|
public
|
RES_SUCCESS = 0
<p>The operation was successful.</p>
The operation was successful.
|
#
|
public
|
RES_FAILURE = 1
<p>The operation failed in some fashion.</p>
The operation failed in some fashion.
|
#
|
public
|
RES_HOST_LOOKUP_FAILURE = 2
<p>DNS lookup failed.</p>
|
#
|
public
|
RES_UNKNOWN_READ_FAILURE = 7
<p>Failed to read network data.</p>
Failed to read network data.
|
#
|
public
|
RES_PROTOCOL_ERROR = 8
<p>Bad command in memcached protocol.</p>
Bad command in memcached protocol.
|
#
|
public
|
RES_CLIENT_ERROR = 9
<p>Error on the client side.</p>
Error on the client side.
|
#
|
public
|
RES_SERVER_ERROR = 10
<p>Error on the server side.</p>
Error on the server side.
|
#
|
public
|
RES_WRITE_FAILURE = 5
<p>Failed to write network data.</p>
Failed to write network data.
|
#
|
public
|
RES_DATA_EXISTS = 12
<p>Failed to do compare-and-swap: item you are trying to store has been
modified since you last fetched it.</p>
Failed to do compare-and-swap: item you are trying to store has been
modified since you last fetched it.
|
#
|
public
|
RES_NOTSTORED = 14
<p>Item was not stored: but not because of an error. This normally
means that either the condition for an "add" or a …
Item was not stored: but not because of an error. This normally
means that either the condition for an "add" or a "replace" command
wasn't met, or that the item is in a delete queue.
|
#
|
public
|
RES_NOTFOUND = 16
<p>Item with this key was not found (with "get" operation or "cas"
operations).</p>
Item with this key was not found (with "get" operation or "cas"
operations).
|
#
|
public
|
RES_PARTIAL_READ = 18
<p>Partial network data read error.</p>
Partial network data read error.
|
#
|
public
|
RES_SOME_ERRORS = 19
<p>Some errors occurred during multi-get.</p>
Some errors occurred during multi-get.
|
#
|
public
|
RES_NO_SERVERS = 20
<p>Server list is empty.</p>
|
#
|
public
|
RES_END = 21
<p>End of result set.</p>
|
#
|
public
|
RES_ERRNO = 26
<p>System error.</p>
|
#
|
public
|
RES_BUFFERED = 32
<p>The operation was buffered.</p>
The operation was buffered.
|
#
|
public
|
RES_TIMEOUT = 31
<p>The operation timed out.</p>
|
#
|
public
|
RES_BAD_KEY_PROVIDED = 33
<p>MEMCACHED_BAD_KEY_PROVIDED: The key provided is not a valid key.</p>
MEMCACHED_BAD_KEY_PROVIDED: The key provided is not a valid key.
|
#
|
public
|
RES_STORED = 15
<p>MEMCACHED_STORED: The requested object has been successfully stored on the server.</p>
MEMCACHED_STORED: The requested object has been successfully stored on the server.
|
#
|
public
|
RES_DELETED = 22
<p>MEMCACHED_DELETED: The object requested by the key has been deleted.</p>
MEMCACHED_DELETED: The object requested by the key has been deleted.
|
#
|
public
|
RES_STAT = 24
<p>MEMCACHED_STAT: A “stat” command has been returned in the protocol.</p>
MEMCACHED_STAT: A “stat” command has been returned in the protocol.
|
#
|
public
|
RES_ITEM = 25
<p>MEMCACHED_ITEM: An item has been fetched (this is an internal error only).</p>
MEMCACHED_ITEM: An item has been fetched (this is an internal error only).
|
#
|
public
|
RES_NOT_SUPPORTED = 28
<p>MEMCACHED_NOT_SUPPORTED: The given method is not supported in the server.</p>
MEMCACHED_NOT_SUPPORTED: The given method is not supported in the server.
|
#
|
public
|
RES_FETCH_NOTFINISHED = 30
<p>MEMCACHED_FETCH_NOTFINISHED: A request has been made, but the server has not finished the fetch of the last request.…
MEMCACHED_FETCH_NOTFINISHED: A request has been made, but the server has not finished the fetch of the last request.
|
#
|
public
|
RES_SERVER_MARKED_DEAD = 35
<p>MEMCACHED_SERVER_MARKED_DEAD: The requested server has been marked dead.</p>
MEMCACHED_SERVER_MARKED_DEAD: The requested server has been marked dead.
|
#
|
public
|
RES_UNKNOWN_STAT_KEY = 36
<p>MEMCACHED_UNKNOWN_STAT_KEY: The server you are communicating with has a stat key which has not be defined in the…
MEMCACHED_UNKNOWN_STAT_KEY: The server you are communicating with has a stat key which has not be defined in the protocol.
|
#
|
public
|
RES_INVALID_HOST_PROTOCOL = 34
<p>MEMCACHED_INVALID_HOST_PROTOCOL: The server you are connecting too has an invalid protocol. Most likely you are…
MEMCACHED_INVALID_HOST_PROTOCOL: The server you are connecting too has an invalid protocol. Most likely you are connecting to an older server that does not speak the binary protocol.
|
#
|
public
|
RES_MEMORY_ALLOCATION_FAILURE = 17
<p>MEMCACHED_MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.</p>
MEMCACHED_MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.
|
#
|
public
|
RES_E2BIG = 37
<p>MEMCACHED_E2BIG: Item is too large for the server to store.</p>
MEMCACHED_E2BIG: Item is too large for the server to store.
|
#
|
public
|
RES_KEY_TOO_BIG = 39
<p>MEMCACHED_KEY_TOO_BIG: The key that has been provided is too large for the given server.</p>
MEMCACHED_KEY_TOO_BIG: The key that has been provided is too large for the given server.
|
#
|
public
|
RES_SERVER_TEMPORARILY_DISABLED = 47
<p>MEMCACHED_SERVER_TEMPORARILY_DISABLED</p>
MEMCACHED_SERVER_TEMPORARILY_DISABLED
|
#
|
public
|
RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48
<p>MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.
MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.
#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000008
|
#
|
public
|
RES_AUTH_PROBLEM = 40
<p>MEMCACHED_AUTH_PROBLEM: An unknown issue has occured during authentication.</p>
MEMCACHED_AUTH_PROBLEM: An unknown issue has occured during authentication.
|
#
|
public
|
RES_AUTH_FAILURE = 41
<p>MEMCACHED_AUTH_FAILURE: The credentials provided are not valid for this server.</p>
MEMCACHED_AUTH_FAILURE: The credentials provided are not valid for this server.
|
#
|
public
|
RES_AUTH_CONTINUE = 42
<p>MEMCACHED_AUTH_CONTINUE: Authentication has been paused.</p>
MEMCACHED_AUTH_CONTINUE: Authentication has been paused.
|
#
|
public
|
RES_CONNECTION_FAILURE = 3
<p>MEMCACHED_CONNECTION_FAILURE: A unknown error has occured while trying to connect to a server.</p>
MEMCACHED_CONNECTION_FAILURE: A unknown error has occured while trying to connect to a server.
|
#
|
public
|
RES_CONNECTION_BIND_FAILURE = 4
MEMCACHED_CONNECTION_BIND_FAILURE: We were not able to bind() to the socket.
MEMCACHED_CONNECTION_BIND_FAILURE: We were not able to bind() to the socket.
|
#
|
public
|
RES_READ_FAILURE = 6
<p>MEMCACHED_READ_FAILURE: A read failure has occurred.</p>
MEMCACHED_READ_FAILURE: A read failure has occurred.
|
#
|
public
|
RES_DATA_DOES_NOT_EXIST = 13
<p>MEMCACHED_DATA_DOES_NOT_EXIST: The data requested with the key given was not found.</p>
MEMCACHED_DATA_DOES_NOT_EXIST: The data requested with the key given was not found.
|
#
|
public
|
RES_VALUE = 23
<p>MEMCACHED_VALUE: A value has been returned from the server (this is an internal condition only).</p>
MEMCACHED_VALUE: A value has been returned from the server (this is an internal condition only).
|
#
|
public
|
RES_FAIL_UNIX_SOCKET = 27
<p>MEMCACHED_FAIL_UNIX_SOCKET: A connection was not established with the server via a unix domain socket.</p>
MEMCACHED_FAIL_UNIX_SOCKET: A connection was not established with the server via a unix domain socket.
|
#
|
public
|
RES_NO_KEY_PROVIDED = 29
No key was provided.</p>
|
#
|
public
|
RES_INVALID_ARGUMENTS = 38
<p>MEMCACHED_INVALID_ARGUMENTS: The arguments supplied to the given function were not valid.</p>
MEMCACHED_INVALID_ARGUMENTS: The arguments supplied to the given function were not valid.
|
#
|
public
|
RES_PARSE_ERROR = 43
<p>MEMCACHED_PARSE_ERROR: An error has occurred while trying to parse the configuration string. You should use memparse…
MEMCACHED_PARSE_ERROR: An error has occurred while trying to parse the configuration string. You should use memparse to determine what the error was.
|
#
|
public
|
RES_PARSE_USER_ERROR = 44
<p>MEMCACHED_PARSE_USER_ERROR: An error has occurred in parsing the configuration string.</p>
MEMCACHED_PARSE_USER_ERROR: An error has occurred in parsing the configuration string.
|
#
|
public
|
RES_DEPRECATED = 45
<p>MEMCACHED_DEPRECATED: The method that was requested has been deprecated.</p>
MEMCACHED_DEPRECATED: The method that was requested has been deprecated.
|
#
|
public
|
RES_IN_PROGRESS = 46
|
#
|
public
|
RES_MAXIMUM_RETURN = 49
<p>MEMCACHED_MAXIMUM_RETURN: This in an internal only state.</p>
MEMCACHED_MAXIMUM_RETURN: This in an internal only state.
|
#
|
public
|
ON_CONNECT = 0
Server callbacks, if compiled with --memcached-protocol
Server callbacks, if compiled with --memcached-protocol
|
#
|
public
|
ON_ADD = 1
|
#
|
public
|
ON_APPEND = 2
|
#
|
public
|
ON_DECREMENT = 3
|
#
|
public
|
ON_DELETE = 4
|
#
|
public
|
ON_FLUSH = 5
|
#
|
public
|
ON_GET = 6
|
#
|
public
|
ON_INCREMENT = 7
|
#
|
public
|
ON_NOOP = 8
|
#
|
public
|
ON_PREPEND = 9
|
#
|
public
|
ON_QUIT = 10
|
#
|
public
|
ON_REPLACE = 11
|
#
|
public
|
ON_SET = 12
|
#
|
public
|
ON_STAT = 13
|
#
|
public
|
ON_VERSION = 14
|
#
|
public
|
RESPONSE_SUCCESS = 0
Constants used when compiled with --memcached-protocol
Constants used when compiled with --memcached-protocol
|
#
|
public
|
RESPONSE_KEY_ENOENT = 1
|
#
|
public
|
RESPONSE_KEY_EEXISTS = 2
|
#
|
public
|
RESPONSE_E2BIG = 3
|
#
|
public
|
RESPONSE_EINVAL = 4
|
#
|
public
|
RESPONSE_NOT_STORED = 5
|
#
|
public
|
RESPONSE_DELTA_BADVAL = 6
|
#
|
public
|
RESPONSE_NOT_MY_VBUCKET = 7
|
#
|
public
|
RESPONSE_AUTH_ERROR = 32
|
#
|
public
|
RESPONSE_AUTH_CONTINUE = 33
|
#
|
public
|
RESPONSE_UNKNOWN_COMMAND = 129
|
#
|
public
|
RESPONSE_ENOMEM = 130
|
#
|
public
|
RESPONSE_NOT_SUPPORTED = 131
|
#
|
public
|
RESPONSE_EINTERNAL = 132
|
#
|
public
|
RESPONSE_EBUSY = 133
|
#
|
public
|
RESPONSE_ETMPFAIL = 134
|
#
|
public
|
RES_CONNECTION_SOCKET_CREATE_FAILURE = 11
<p>Failed to create network socket.</p>
Failed to create network socket.
|
#
|
public
|
RES_PAYLOAD_FAILURE = -1001
<p>Payload failure: could not compress/decompress or serialize/unserialize the value.</p>
Payload failure: could not compress/decompress or serialize/unserialize the value.
|
#
|
public
|
SERIALIZER_PHP = 1
<p>The default PHP serializer.</p>
The default PHP serializer.
|
#
|
public
|
SERIALIZER_IGBINARY = 2
<p>The igbinary serializer.
Instead of textual representation it stores PHP data structures in a
compact binary form,…
The igbinary serializer.
Instead of textual representation it stores PHP data structures in a
compact binary form, resulting in space and time gains.
|
#
|
public
|
SERIALIZER_JSON = 3
<p>The JSON serializer. Requires PHP 5.2.10+.</p>
The JSON serializer. Requires PHP 5.2.10+.
|
#
|
public
|
SERIALIZER_JSON_ARRAY = 4
|
#
|
public
|
SERIALIZER_MSGPACK = 5
<p>The msgpack serializer.</p>
|
#
|
public
|
COMPRESSION_FASTLZ = 2
|
#
|
public
|
COMPRESSION_ZLIB = 1
|
#
|
public
|
GET_PRESERVE_ORDER = 1
<p>A flag for <b>Memcached::getMulti</b> and
<b>Memcached::getMultiByKey</b> to ensure that the keys are
returned in…
A flag for Memcached::getMulti and
Memcached::getMultiByKey to ensure that the keys are
returned in the same order as they were requested in. Non-existing keys
get a default value of NULL.
|
#
|
public
|
GET_EXTENDED = 2
A flag for <b>Memcached::get()</b>, <b>Memcached::getMulti()</b> and
<b>Memcached::getMultiByKey()</b> to ensure that…
A flag for Memcached::get(), Memcached::getMulti() and
Memcached::getMultiByKey() to ensure that the CAS token values are returned as well.
|
#
|
public
|
GET_ERROR_RETURN_VALUE = false
|
#
|