Index: branches/5.2.x/core/units/helpers/sections_helper.php =================================================================== diff -u -N -r14244 -r14560 --- branches/5.2.x/core/units/helpers/sections_helper.php (.../sections_helper.php) (revision 14244) +++ branches/5.2.x/core/units/helpers/sections_helper.php (.../sections_helper.php) (revision 14560) @@ -1,6 +1,6 @@ Application->isCachingType(CACHING_TYPE_MEMORY)) { - $data = $this->Application->getCache('master:sections_parsed', false); + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { + $data = $this->Application->getCache('master:sections_parsed', false, CacheSettings::$sectionsParsedRebuildTime); } else { - $data = $this->Application->getDBCache('sections_parsed'); + $data = $this->Application->getDBCache('sections_parsed', CacheSettings::$sectionsParsedRebuildTime); } - if ($data) { + if ( $data ) { $this->Tree = unserialize($data); return ; } - if (!(defined('IS_INSTALL') && IS_INSTALL)) { + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { + $this->Application->rebuildCache('master:sections_parsed', kCache::REBUILD_NOW, CacheSettings::$sectionsParsedRebuildTime); + } + else { + $this->Application->rebuildDBCache('sections_parsed', kCache::REBUILD_NOW, CacheSettings::$sectionsParsedRebuildTime); + } + + if ( !defined('IS_INSTALL') || !IS_INSTALL ) { // don't reread all configs during install, because they are reread on every install step $this->Application->UnitConfigReader->ReReadConfigs(); } @@ -201,7 +208,7 @@ $this->Application->HandleEvent( new kEvent('adm:OnAfterBuildTree') ); - if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) { + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { $this->Application->setCache('master:sections_parsed', serialize($this->Tree)); } else {