Memcached::getByKey
(PECL memcached >= 0.1.0)
Retrieve an item from a specific server
Description
Memcached::getByKey() is functionally equivalent to Memcached::get, except that the free-form server_key can be used to map the key to a specific server.
Parameters
server_keyServer_key
keyThe key of the item to fetch.
cache_cbRead-through caching callback or null
get_flagsFlags to control the returned result. When value of
Memcached::GET_EXTENDEDis given will return the CAS token.
Return Values
Returns the value stored in the cache or false otherwise. The Memcached::getResultCode will return Memcached::RES_NOTFOUND if the key does not exist.
Changelog
| Version | Description |
|---|---|
| PECL memcached 3.0.0 | The cas_token parameter was removed. Instead get_flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched. |
See Also
Memcached::getMemcached::getMultiMemcached::getDelayed