Index: branches/RC/core/units/general/helpers/sections_helper.php =================================================================== diff -u -N -r9776 -r10580 --- branches/RC/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 9776) +++ branches/RC/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 10580) @@ -33,9 +33,11 @@ */ function BuildTree() { - $data = $this->Conn->GetRow('SELECT Data, Cached FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); + if (!isset($this->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 ($data) { - $this->Tree = unserialize($data['Data']); + $this->Tree = unserialize($data); return ; } @@ -141,6 +143,11 @@ } $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; + } + $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("sections_parsed", '.$this->Conn->qstr(serialize($this->Tree)).', '.adodb_mktime().')'); }