public function clearCache($groups = null)
{
if (!$groups || $groups === '*') {
$this->cache = [];
$this->cacheIsDirty = !!$this->persistentPrefix;
} elseif ($this->cache()) {
if (!is_array($groups)) {
$groups = [$groups];
}
foreach ($groups as $group) {
if (array_key_exists($group, $this->cache)) {
unset($this->cache[$group]);
$this->cacheIsDirty = !!$this->persistentPrefix;
}
}
}
}