Index: branches/5.2.x/core/units/helpers/menu_helper.php =================================================================== diff -u -N -r14244 -r14560 --- branches/5.2.x/core/units/helpers/menu_helper.php (.../menu_helper.php) (revision 14244) +++ branches/5.2.x/core/units/helpers/menu_helper.php (.../menu_helper.php) (revision 14560) @@ -1,6 +1,6 @@ Menu) { - if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) { - $menu = $this->Application->getCache('master:cms_menu', false); + if ( !$this->Menu ) { + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { + $menu = $this->Application->getCache('master:cms_menu', false, CacheSettings::$cmsMenuRebuildTime); } else { - $menu = $this->Application->getDBCache('cms_menu'); + $menu = $this->Application->getDBCache('cms_menu', CacheSettings::$cmsMenuRebuildTime); } if ($menu) { $menu = unserialize($menu); $this->parentPaths = $menu['parentPaths']; } else { + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { + $this->Application->rebuildCache('master:cms_menu', kCache::REBUILD_NOW, CacheSettings::$cmsMenuRebuildTime); + } + else { + $this->Application->rebuildDBCache('cms_menu', kCache::REBUILD_NOW, CacheSettings::$cmsMenuRebuildTime); + } + $menu = $this->_altBuildMenuStructure(Array ('CategoryId' => $root_cat, 'ParentPath' => $root_path)); $menu['parentPaths'] = $this->parentPaths;