View Full Version : What happens if templates are not cached?
ThorstenA
07-30-2008, 12:55 PM
I wonder what happens if templates are not cached? How does vbulletin then fetch them? Hoch much speed improvement is there if templates are cached? I found something here (https://vborg.vbsupport.ru/showthread.php?t=87285) and here (https://vborg.vbsupport.ru/showthread.php?t=119933). Does it mean that when I do not have cached postbit template, there is an additional query each time a postbit is displayed? Therefore 15 additional queries if I display showthread?
Opserty
07-30-2008, 01:09 PM
There is an additional query for each extra template that is fetched but on once. The templates are then added to the cache once they have been fetched by the query.
See the articles section on how to cache templates using plugins.
ThorstenA
07-30-2008, 01:11 PM
Thanks. I already cache templates but was just curious :)
PaulSonny
07-30-2008, 08:56 PM
Sorry to hi-jack this thread but felt my question is appropiate.
Do you need to cache all templates you have or just select templates?
Also can someone also please explain what the different types are, and what they mean? Like Action templates for example.
Thanks, Paul.
Opserty
07-30-2008, 09:03 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=104532&highlight=cache" target="_blank">How-To Cache Templates</a>
You need to cache any templates which are fetched by your page/modification.
$globaltemplates are for templates used by all actions, $actiontemplates are action specific.
(You can cache templates through the cache_templates hook too).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.