Index: branches/5.1.x/core/units/helpers/sections_helper.php =================================================================== diff -u -N -r13113 -r13168 --- branches/5.1.x/core/units/helpers/sections_helper.php (.../sections_helper.php) (revision 13113) +++ branches/5.1.x/core/units/helpers/sections_helper.php (.../sections_helper.php) (revision 13168) @@ -1,6 +1,6 @@ Application->Memcached) || !($data = $this->Application->Memcached->get('master:sections_parsed'))) { - $data = $this->Conn->GetOne('SELECT Data FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); + if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) { + $data = $this->Application->getCache('master:sections_parsed', false); } + else { + $data = $this->Application->getDBCache('sections_parsed'); + } + if ($data) { $this->Tree = unserialize($data); return ; @@ -174,12 +178,12 @@ $this->Application->HandleEvent( new kEvent('adm:OnAfterBuildTree') ); - if (isset($this->Application->Memcached)) { - $this->Application->Memcached->set('master:sections_parsed',serialize($this->Tree), 0, 0); - return; + if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) { + $this->Application->setCache('master:sections_parsed', serialize($this->Tree)); } - - $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("sections_parsed", '.$this->Conn->qstr(serialize($this->Tree)).', '.adodb_mktime().')'); + else { + $this->Application->setDBCache('sections_parsed', serialize($this->Tree)); + } } function _processPrefixSections($prefix)