public function clear($cache = null)
{
if (null !== $cache) {
if (!array_key_exists($cache, $this->caches)) {
throw new CacheNotFoundException($cache);
}
$this->caches[$cache]->clear();
} else {
foreach ($this->caches as $cache) {
$cache->clear();
}
}
}