EndDataCache
CPageCache::EndDataCache()
The method prints the buffered HTML and saves it on disk in cache file. Non-static method.
Parameters
No parameters.See Also
Example
<? // create object $obCache = new CPageCache; // caching time - 30 minutes $life_time = 30*60; // generate cache ID depending on all the parameters // that can affect the resulting HTML $cache_id = $ELEMENT_ID.$IBLOCK_TYPE.$USER->GetUserGroupString(); // initialize buffering of printed data if($obCache->StartDataCache($life_time, $cache_id, "/")): // select parameters of information block element fr om the data base if($arIBlockElement = GetIBlockElement($ELEMENT_ID, $IBLOCK_TYPE)): echo "<pre>"; print_r($arIBlockElement); echo "</pre>"; endif; // record the buffered result into cache file $obCache->EndDataCache(); endif; ?>
© «Bitrix24», 2001-2024