public function CacheWincache::Clear in Drupal driver for SQL Server and SQL Azure 8.2
Clear a cache item.
Parameters
string $cid:
Overrides CacheInterface::Clear
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Component/ CacheWincache.php, line 76
Class
- CacheWincache
- Wincache implementation for the in-memory fast cache. Use this for very frequently used cache items.
Namespace
Drupal\Driver\Database\sqlsrv\ComponentCode
public function Clear($cid) {
if (empty($cid)) {
$info = wincache_ucache_info();
foreach ($info['ucache_entries'] as $entry) {
$key = $entry['key_name'];
if (strpos($key, $this->prefix . ':') === 0) {
wincache_ucache_delete($key);
unset($this->data[$key]);
}
}
}
else {
wincache_ucache_delete($this->prefix . ':' . $cid);
unset($this->data[$cid]);
}
}