Comment to Caching Page Blocks
-
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']);
}