/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Controller
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Controller/ToolbarController.php (1692B)
loadComponent('RequestHandler');
}
/**
* Clear a named cache.
*
* @return void
* @throws \Cake\Http\Exception\NotFoundException
*/
public function clearCache()
{
$this->request->allowMethod('post');
$name = $this->request->getData('name');
if (!$name) {
throw new NotFoundException('Invalid cache engine name.');
}
$success = Cache::clear($name);
$message = $success ?
sprintf('%s cache cleared.', $name) :
sprintf('%s cache could not be cleared.', $name);
$this->set(compact('success', 'message'));
$this->viewBuilder()->setOption('serialize', ['success', 'message']);
}
}