Index: branches/5.2.x/core/kernel/managers/cache_manager.php =================================================================== diff -u -N -r15033 -r15073 --- branches/5.2.x/core/kernel/managers/cache_manager.php (.../cache_manager.php) (revision 15033) +++ branches/5.2.x/core/kernel/managers/cache_manager.php (.../cache_manager.php) (revision 15073) @@ -1,6 +1,6 @@ Application->InitManagers(); - $this->Application->Factory->setFromCache($cache); - $this->Application->UnitConfigReader->setFromCache($cache); - $this->Application->EventManager->setFromCache($cache); + $this->Application->setFromCache($cache); $aggregator =& $this->Application->recallObject('TagsAggregator', 'kArray'); /* @var $aggregator kArray */ $aggregator->setFromCache($cache); $this->setFromCache($cache); - $this->Application->setFromCache($cache); unset($cache); return true; @@ -311,10 +308,13 @@ */ public function EmptyUnitCache() { + // maybe discover keys automatically from corresponding classes $cache_keys = Array ( 'Factory.Files', 'Factory.realClasses', 'Factory.Dependencies', - 'EventManager.buildEvents', 'EventManager.beforeHooks', - 'EventManager.afterHooks', 'EventManager.scheduledTasks', + 'ConfigReader.prefixFiles', + 'EventManager.beforeHooks', 'EventManager.afterHooks', 'EventManager.scheduledTasks', 'EventManager.buildEvents', + 'Application.ReplacementTemplates', 'Application.RewriteListeners', 'Application.ModuleInfo', + 'Application.ConfigHash', 'Application.ConfigCacheIds', ); $empty_cache = Array (); @@ -323,8 +323,8 @@ $empty_cache[$cache_key] = Array (); } - $this->Application->Factory->setFromCache($empty_cache); - $this->Application->EventManager->setFromCache($empty_cache); + $this->Application->setFromCache($empty_cache); + $this->setFromCache($empty_cache); // otherwise ModulesHelper indirectly used from includeConfigFiles won't work $this->Application->RegisterDefaultClasses(); @@ -343,12 +343,9 @@ $this->preloadConfigVars(); // preloading will put to cache $cache = array_merge( - $this->Application->Factory->getToCache(), - $this->Application->UnitConfigReader->getToCache(), - $this->Application->EventManager->getToCache(), + $this->Application->getToCache(), $aggregator->getToCache(), - $this->getToCache(), - $this->Application->getToCache() + $this->getToCache() ); $cache_rebuild_by = SERVER_NAME . ' (' . getenv('REMOTE_ADDR') . ') - ' . adodb_date('d/m/Y H:i:s');