mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
added admin/crearCache
This commit is contained in:
@@ -29,5 +29,19 @@ class Admin extends \Espo\Core\Controllers\Base
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function actionClearCache($params, $data)
|
||||
{
|
||||
$cacheDir = $this->getContainer()->get('config')->get('cachePath');
|
||||
|
||||
$result = $this->getContainer()->get('fileManager')->removeInDir($cacheDir);
|
||||
|
||||
if ($result === false) {
|
||||
throw new Error("Error while clearing cache");
|
||||
}
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user