public function DrupalMemcachedBase::get in Memcache Storage 8
Get the cache item from memcached.
Parameters
$key: Cache item key string.
string $cache_bin: Name of the cache bin.
Return value
mixed Cache data or empty, if not found.
Overrides DrupalMemcachedInterface::get
2 calls to DrupalMemcachedBase::get()
- DrupalMemcachedBase::getBinIndex in src/
DrupalMemcachedBase.php - Returns cache bin index. This index is part of memcache key and changes if cache bin should be cleared.
- DrupalMemcachedBase::increaseBinIndex in src/
DrupalMemcachedBase.php - Increase cache bin index. This operation changes all memcache keys in the specified cache bin, so we fake the cache flush operation.
File
- src/
DrupalMemcachedBase.php, line 198
Class
- DrupalMemcachedBase
- Class DrupalMemcachedBase
Namespace
Drupal\memcache_storageCode
public function get($key, $cache_bin = '') {
$cache = $this
->getMulti([
$key,
], $cache_bin = '');
return reset($cache);
}