Answer the question
In order to leave comments, you need to log in
How to add the result of a selection from the database to the cache in result_modofier.php?
Every time the page is refreshed, queries are made to the database in the result_modifier.php file. How can I add their result to the cache and make requests only if the cache is empty?
Answer the question
In order to leave comments, you need to log in
Well then, either transfer the includeTemplate to the cache. Or cache it yourself - you can see an example in the standard template catalog, bootstrap_v4, file section.php
/bitrix/components/bitrix/catalog/templates/bootstrap_v4/section.php
If you make requests through d7, there is a cache parameter, in the docks you will find how to write I don't remember how it works
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question