R
R
run1822020-11-17 17:58:42
1C-Bitrix
run182, 2020-11-17 17:58:42

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

1 answer(s)
R
run182, 2020-11-17
@run182

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 question

Ask a Question

731 491 924 answers to any question