$cachePath = "/".SITE_ID."/my/mycomponent/".$arParams["ELEMENT_ID"];
$arParams["CACHE_TIME"] = 3600000;
$arParams["CODE"] = preg_replace('/[^a-zA-Z0-9_]/', '', $_REQUEST['code']);
if ($this->StartResultCache())
{
$arSelect = array(
"ID",
"NAME",
"IBLOCK_ID",
"CODE",
"DETAIL_TEXT",
"PROPERTY_series",
// около 10 св-в
);
$arFilter = array(
"IBLOCK_ID" => 1,
"CODE" => $arParams["CODE"]
);
$rsElement = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>1), $arSelect);
if ($arElement = $rsElement->Fetch())
{
$arResult['code'] = $arElement["CODE"];
// ...
}
if (!$arResult['id'])
{
$this->AbortResultCache();
}
else
{
$this->IncludeComponentTemplate();
}
}
ƒ (a,b){return new r.fn.init(a,b)}