* <p>MEMCACHED_BAD_KEY_PROVIDED: The key provided is not a valid key.</p>
*/
const RES_BAD_KEY_PROVIDED = 33;
/**
* <p>MEMCACHED_STORED: The requested object has been successfully stored on the server.</p>
*/
const RES_STORED = 15;
/**
* <p>MEMCACHED_DELETED: The object requested by the key has been deleted.</p>
*/
const RES_DELETED = 22;
/**
* <p>MEMCACHED_STAT: A “stat” command has been returned in the protocol.</p>
*/
const RES_STAT = 24;
/**
* <p>MEMCACHED_ITEM: An item has been fetched (this is an internal error only).</p>
*/
const RES_ITEM = 25;
/**
* <p>MEMCACHED_NOT_SUPPORTED: The given method is not supported in the server.</p>
*/
const RES_NOT_SUPPORTED = 28;
/**
* <p>MEMCACHED_FETCH_NOTFINISHED: A request has been made, but the server has not finished the fetch of the last request.</p>
*/
const RES_FETCH_NOTFINISHED = 30;
/**
* <p>MEMCACHED_SERVER_MARKED_DEAD: The requested server has been marked dead.</p>
*/
const RES_SERVER_MARKED_DEAD = 35;
/**
* <p>MEMCACHED_UNKNOWN_STAT_KEY: The server you are communicating with has a stat key which has not be defined in the protocol.</p>
*/
const RES_UNKNOWN_STAT_KEY = 36;
/**
* <p>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.</p>
*/
const RES_INVALID_HOST_PROTOCOL = 34;
/**
* <p>MEMCACHED_MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.</p>
*/
const RES_MEMORY_ALLOCATION_FAILURE = 17;
/**
* <p>MEMCACHED_E2BIG: Item is too large for the server to store.</p>
*/
const RES_E2BIG = 37;
/**
* <p>MEMCACHED_KEY_TOO_BIG: The key that has been provided is too large for the given server.</p>
*/
const RES_KEY_TOO_BIG = 39;
/**
* <p>MEMCACHED_SERVER_TEMPORARILY_DISABLED</p>
*/
const RES_SERVER_TEMPORARILY_DISABLED = 47;
/**
* <p>MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.
* <p>MEMCACHED_AUTH_PROBLEM: An unknown issue has occured during authentication.</p>
*/
const RES_AUTH_PROBLEM = 40;
/**
* <p>MEMCACHED_AUTH_FAILURE: The credentials provided are not valid for this server.</p>
*/
const RES_AUTH_FAILURE = 41;
/**
* <p>MEMCACHED_AUTH_CONTINUE: Authentication has been paused.</p>
*/
const RES_AUTH_CONTINUE = 42;
/**
* <p>MEMCACHED_CONNECTION_FAILURE: A unknown error has occured while trying to connect to a server.</p>
*/
const RES_CONNECTION_FAILURE = 3;
/**
* <p>MEMCACHED_CONNECTION_BIND_FAILURE: Deprecated since version <0.30(libmemcached).
* We were not able to bind() to the socket.</p>
*/
const RES_CONNECTION_BIND_FAILURE = 4;
/**
* <p>MEMCACHED_READ_FAILURE: A read failure has occurred.</p>
*/
const RES_READ_FAILURE = 6;
/**
* <p>MEMCACHED_DATA_DOES_NOT_EXIST: The data requested with the key given was not found.</p>
*/
const RES_DATA_DOES_NOT_EXIST = 13;
/**
* <p>MEMCACHED_VALUE: A value has been returned from the server (this is an internal condition only).</p>
*/
const RES_VALUE = 23;
/**
* <p>MEMCACHED_FAIL_UNIX_SOCKET: A connection was not established with the server via a unix domain socket.</p>
*/
const RES_FAIL_UNIX_SOCKET = 27;
/**
* <p>MEMCACHED_NO_KEY_PROVIDED: Deprecated since version <0.30(libmemcached):UseMEMCACHED_BAD_KEY_PROVIDEDinstead.
* No key was provided.</p>
*/
const RES_NO_KEY_PROVIDED = 29;
/**
* <p>MEMCACHED_INVALID_ARGUMENTS: The arguments supplied to the given function were not valid.</p>
*/
const RES_INVALID_ARGUMENTS = 38;
/**
* <p>MEMCACHED_PARSE_ERROR: An error has occurred while trying to parse the configuration string. You should use memparse to determine what the error was.</p>
*/
const RES_PARSE_ERROR = 43;
/**
* <p>MEMCACHED_PARSE_USER_ERROR: An error has occurred in parsing the configuration string.</p>
*/
const RES_PARSE_USER_ERROR = 44;
/**
* <p>MEMCACHED_DEPRECATED: The method that was requested has been deprecated.</p>
*/
const RES_DEPRECATED = 45;
//unknow
const RES_IN_PROGRESS = 46;
/**
* <p>MEMCACHED_MAXIMUM_RETURN: This in an internal only state.</p>
*/
const RES_MAXIMUM_RETURN = 49;
/**
* Server callbacks, if compiled with --memcached-protocol
* 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.
* </p>
* @param string $key <p>
* The key of the item to fetch.
* </p>
* @param callable $cache_cb [optional] <p>
* Read-through caching callback or <b>NULL</b>
* </p>
* @param int $flags [optional] <p>
* The flags for the get operation.
* </p>
* @return mixed the value stored in the cache or <b>FALSE</b> otherwise.
* The <b>Memcached::getResultCode</b> will return
* <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
*/
public function getByKey ($server_key, $key, callable $cache_cb = null, $flags = 0) {}
* 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.
* </p>
* @param array $keys <p>
* Array of keys to retrieve.
* </p>
* @param int $flags [optional] <p>
* The flags for the get operation.
* </p>
* @return array|false the array of found items or <b>FALSE</b> on failure.
* Use <b>Memcached::getResultCode</b> if necessary.
*/
public function getMultiByKey ($server_key, array $keys, $flags = 0) {}
* 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.
* </p>
* @param array $keys <p>
* Array of keys to request.
* </p>
* @param bool $with_cas [optional] <p>
* Whether to request CAS token values also.
* </p>
* @param callable $value_cb [optional] <p>
* The result callback or <b>NULL</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* Use <b>Memcached::getResultCode</b> if necessary.
*/
public function getDelayedByKey ($server_key, array $keys, $with_cas = null, callable $value_cb = null) {}
* 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.
* </p>
* @param string $key <p>
* The key under which to store the value.
* </p>
* @param mixed $value <p>
* The value to store.
* </p>
* @param int $expiration [optional] <p>
* The expiration time, defaults to 0. See Expiration Times for more info.
* </p>
* @param int $udf_flags [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* Use <b>Memcached::getResultCode</b> if necessary.
*/
public function setByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
* 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.
* </p>
* @param string $key <p>
* The key under which to store the value.
* </p>
* @param int $expiration <p>
* The expiration time, defaults to 0. See Expiration Times for more info.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* Use <b>Memcached::getResultCode</b> if necessary.
*/
public function touchByKey ($server_key, $key, $expiration) {}
* 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.
* </p>
* @param array $items <p>
* An array of key/value pairs to store on the server.
* </p>
* @param int $expiration [optional] <p>
* The expiration time, defaults to 0. See Expiration Times for more info.
* </p>
* @param int $udf_flags [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* Use <b>Memcached::getResultCode</b> if necessary.
*/
public function setMultiByKey ($server_key, array $items, $expiration = 0, $udf_flags = 0) {}
* Unique value associated with the existing item. Generated by memcache.
* </p>
* @param string $server_key <p>
* 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.
* </p>
* @param string $key <p>
* The key under which to store the value.
* </p>
* @param mixed $value <p>
* The value to store.
* </p>
* @param int $expiration [optional] <p>
* The expiration time, defaults to 0. See Expiration Times for more info.
* </p>
* @param int $udf_flags [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* The <b>Memcached::getResultCode</b> will return
* <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying
* to store has been modified since you last fetched it.
*/
public function casByKey ($cas_token, $server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
* 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.
* </p>
* @param string $key <p>
* The key under which to store the value.
* </p>
* @param mixed $value <p>
* The value to store.
* </p>
* @param int $expiration [optional] <p>
* The expiration time, defaults to 0. See Expiration Times for more info.
* </p>
* @param int $udf_flags [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* The <b>Memcached::getResultCode</b> will return
* <b>Memcached::RES_NOTSTORED</b> if the key already exists.
*/
public function addByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
* 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.
* </p>
* @param string $key <p>
* The key under which to store the value.
* </p>
* @param string $value <p>
* The string to append.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* The <b>Memcached::getResultCode</b> will return
* <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
*/
public function appendByKey ($server_key, $key, $value) {}
* 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.
* </p>
* @param string $key <p>
* The key of the item to prepend the data to.
* </p>
* @param string $value <p>
* The string to prepend.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* The <b>Memcached::getResultCode</b> will return
* <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
*/
public function prependByKey ($server_key, $key, $value) {}
* 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.
* </p>
* @param string $key <p>
* The key under which to store the value.
* </p>
* @param mixed $value <p>
* The value to store.
* </p>
* @param int $expiration [optional] <p>
* The expiration time, defaults to 0. See Expiration Times for more info.
* </p>
* @param int $udf_flags [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* The <b>Memcached::getResultCode</b> will return
* <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
*/
public function replaceByKey ($server_key, $key, $value, $expiration = null, $udf_flags = 0) {}
* 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.
* </p>
* @param string $key <p>
* The key to be deleted.
* </p>
* @param int $time [optional] <p>
* The amount of time the server will wait to delete the item.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* The <b>Memcached::getResultCode</b> will return
* <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
*/
public function deleteByKey ($server_key, $key, $time = 0) {}
* 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.
* </p>
* @param array $keys <p>
* The keys to be deleted.
* </p>
* @param int $time [optional] <p>
* The amount of time the server will wait to delete the items.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* The <b>Memcached::getResultCode</b> will return
* <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
*/
public function deleteMultiByKey ($server_key, array $keys, $time = 0) {}
* 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.
* </p>
* @param string $key <p>
* The key of the item to increment.
* </p>
* @param int $offset [optional] <p>
* The amount by which to increment the item's value.
* </p>
* @param int $initial_value [optional] <p>
* The value to set the item to if it doesn't currently exist.
* </p>
* @param int $expiry [optional] <p>
* The expiry time to set on the item.
* </p>
* @return int|false new item's value on success or <b>FALSE</b> on failure.
*/
public function incrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}
/**
* (PECL memcached >= 2.0.0)<br/>
* Decrement numeric item's value, stored on a specific server
* 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.
* </p>
* @param string $key <p>
* The key of the item to decrement.
* </p>
* @param int $offset [optional] <p>
* The amount by which to decrement the item's value.
* </p>
* @param int $initial_value [optional] <p>
* The value to set the item to if it doesn't currently exist.
* </p>
* @param int $expiry [optional] <p>
* The expiry time to set on the item.
* </p>
* @return int|false item's new value on success or <b>FALSE</b> on failure.
*/
public function decrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}
* 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.
* </p>
* @return array an array containing three keys of host,
* port, and weight on success or <b>FALSE</b>
* on failure.
* Use <b>Memcached::getResultCode</b> if necessary.