How to cache a block of code on the website (cms Bitrix)?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
Hello. Please help to understand. Never worked with cache Bitrix, and to do right. Set Yandex the reviews on the website. In the footer of the website. The problem is that Yandex opinion allows you to make 100 queries a day. There is a get request through Yandex API to retrieve a list of reviews on the site. But every time refreshing the page, the query occurs. How to wrap code that he made the request once. The idea of course you can use jquery cookie, but I think it's not a very elegant solution. The idea is possible to do this using the cache Bitrix? Prompt where to dig? Thank you


Found Class CPhpCache but I can not understand how it works... I've business to wrap up... my code for get request

<?$url = "";$headers = array("Host:","Accept: */*","Authorization: 98c671b8-a96a-444a-8c53-660b4c63d4e2");$ch = curl_init();curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);$data = curl_exec($ch);curl_close($ch);?><?echo $data?>
by | 23 views

1 Answer

0 like 0 dislike

Related questions

0 like 0 dislike
2 answers
asked May 22, 2019 by So1omon
0 like 0 dislike
3 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
35,430 users