Comment to 'Caching Page Blocks'
  • Thanks LeonidS . Which class deals with page caching? and which methods determine the data to be cached?

    • You may find an example in the public function getCode () of template\scripts\BxBasePage.php class:

      $oCache = $this->_getPageCacheObject();

                  $sKey = $this->_getPageCacheKey();

                  $mixedRet = $oCache->getData($sKey, $this->_aObject['cache_lifetime']);

                  if ($mixedRet !== null) {

                      $sPageCode = $mixedRet;

                  } else {

                      $sPageCode = $this->_getPageCode();

                      $oCache->setData($sKey, $sPageCode, $this->_aObject['cache_lifetime']);

                  }