public function DrupalMemcachedBase::flush in Memcache Storage 8
Reset the cache for the entire cache bin.
Parameters
string $cache_bin: Name of the cache bin.
Overrides DrupalMemcachedInterface::flush
File
- src/
DrupalMemcachedBase.php, line 213
Class
- DrupalMemcachedBase
- Class DrupalMemcachedBase
Namespace
Drupal\memcache_storageCode
public function flush($cache_bin = '') {
// No point in performing any action is we're not connected to memcached.
if (empty($this->isConnected)) {
return;
}
// Memcached doesn't support the flushing by cache bin because of its
// architecture. Although we've got a workaround - we include a special
// int number for every cache bin into the cache key. So as soon as this
// index changes then key for every item changes and it leads to cache
// rebuild.
$this
->increaseBinIndex($cache_bin);
}