protected function _expire($name, $group, $match_mode = 'strict')
{
if (!$this->enabled) {
return null;
}
$keys = array();
switch (strtolower($match_mode)) {
case 'glob':
if (array_key_exists($group, $this->cache_data)) {
$keys = preg_grep(Utils::glob_to_regex($name), array_keys($this->cache_data[$group]));
}
break;
case 'regex':
if (array_key_exists($group, $this->cache_data)) {
$keys = preg_grep($name, array_keys($this->cache_data[$group]));
}
break;
case 'strict':
default:
$keys = array($name);
break;
}
foreach ($keys as $key) {
Plugins::act('cache_expire_before', $name, $group);
apc_delete(implode(':', array($this->prefix, $group, $key)));
Plugins::act('cache_expire_after', $name, $group);
}
}