Template Smarty. There is a template that is the same for a specific section of pages, except for the dynamic part, the data of which is obtained from the database. If it is included in the cache, the data from the database will not change when moving to the next material of the same section (template). If we exclude the dynamic part with the help of {nocache}
tags, then queries to the database to get the dynamic part will be executed at each input on the same material.
Question: how to enable caching of the static part of the template, and the dynamic call to perform only once, and then cache it.
ps The use of cache_id
not suitable (since it caches static elements of the template each time, the cache’s meaning is lost for pages that are visited 1 time)
cache_id
can be assigned toinclude
. Now I’ll throw the dynamic part into separate templates and include them in the static ones withinclude
ccache id
. Should work. - Zhenya40