function dmemcache_get in Memcache API and Integration 5.2
Same name and namespace in other branches
- 5 dmemcache.inc \dmemcache_get()
- 6 dmemcache.inc \dmemcache_get()
- 7 dmemcache.inc \dmemcache_get()
Retrieve a value from the cache.
Parameters
$key The key with which the item was stored.:
$bin The bin in which the item was stored.:
Return value
The item which was originally saved or FALSE
12 calls to dmemcache_get()
- cache_get in ./
memcache.db.inc - Return data from the persistent cache.
- cache_get in ./
memcache.inc - Return data from the persistent cache.
- dtestKeyValue in ./
memcachetests.php - sess_read in ./
session-memcache.inc - sess_read in ./
session-memcache-db.inc
File
- ./
dmemcache.inc, line 56
Code
function dmemcache_get($key, $bin = 'cache') {
global $_memcache_statistics;
$_memcache_statistics['get'][] = $key;
$_memcache_statistics['bins'][] = $bin;
if ($mc = dmemcache_object($bin)) {
$full_key = dmemcache_key($key, $bin);
$result = $mc
->get($full_key);
if ($result) {
$_memcache_statistics['hit'][] = $key;
}
return $result;
}
}