mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
module clear cache
This commit is contained in:
@@ -117,6 +117,8 @@ class DataManager
|
||||
*/
|
||||
public function clearCache(): void
|
||||
{
|
||||
$this->module->clearCache();
|
||||
|
||||
$result = $this->fileManager->removeInDir($this->cachePath);
|
||||
|
||||
if ($result != true) {
|
||||
|
||||
@@ -199,10 +199,6 @@ class Unifier
|
||||
*/
|
||||
private function getModuleList(): array
|
||||
{
|
||||
if (!isset($this->moduleList)) {
|
||||
$this->moduleList = $this->module->getOrderedList();
|
||||
}
|
||||
|
||||
return $this->moduleList;
|
||||
return $this->module->getOrderedList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,6 +188,17 @@ class Module
|
||||
return $this->list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Use event-dispatcher class (passed via constructor).
|
||||
* `$this->clearCacheEventDispatcher->subscribe( ... );`
|
||||
*/
|
||||
public function clearCache(): void
|
||||
{
|
||||
$this->data = null;
|
||||
$this->list = null;
|
||||
$this->internalList = null;
|
||||
}
|
||||
|
||||
private function loadData(): array
|
||||
{
|
||||
$data = [];
|
||||
|
||||
Reference in New Issue
Block a user