Index: branches/5.2.x/core/units/helpers/site_helper.php =================================================================== diff -u -N -r14244 -r14560 --- branches/5.2.x/core/units/helpers/site_helper.php (.../site_helper.php) (revision 14244) +++ branches/5.2.x/core/units/helpers/site_helper.php (.../site_helper.php) (revision 14560) @@ -1,6 +1,6 @@ Application->isCachingType(CACHING_TYPE_MEMORY)) { - $cache = $this->Application->getCache('master:domains_parsed', false); + if ( !isset($cache) ) { + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { + $cache = $this->Application->getCache('master:domains_parsed', false, CacheSettings::$domainsParsedRebuildTime); } else { - $cache = $this->Application->getDBCache('domains_parsed'); + $cache = $this->Application->getDBCache('domains_parsed', CacheSettings::$domainsParsedRebuildTime); } if ($cache) { $cache = unserialize($cache); } else { + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { + $this->Application->rebuildCache('master:domains_parsed', kCache::REBUILD_NOW, CacheSettings::$domainsParsedRebuildTime); + } + else { + $this->Application->rebuildDBCache('domains_parsed', kCache::REBUILD_NOW, CacheSettings::$domainsParsedRebuildTime); + } + $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'SiteDomains ORDER BY Priority DESC';