KiyoshiSaundo
12/20/2017 - 8:00 AM

bx cache

bx cache

$obCache = new CPHPCache;
if ($obCache->InitCache(60*60*24, "cacheID", "/cachePATH/")) {
	$vars = $obCache->GetVars();
	$arResult = $vars["arResult"];
} else if ($obCache->StartDataCache()) {
	CModule::IncludeModule('iblock');
	$arResult = array();

	// get data

	$obCache->EndDataCache( array(
		"arResult" => $arResult
	) );
}