/** * Clears a specific template */ public function clearTemplate() { if ($this->request->param('ID')) { $this->cache->flushByName($this->request->param('ID')); return 'Done' . PHP_EOL; } else { return 'You must specify a template:' . PHP_EOL . $this->index(); } }
/** * Invalidates a cache by a certain name, and logs if available * @param $name * @param $message * @param null $logger */ protected function invalidate($name, $message, $logger = null) { $this->cache->flushByName($name); if ($logger) { $logger->info($message); } }