The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
im editing my new release
https://vborg.vbsupport.ru/showthread.php?t=322031 and in it i cache a temple, then in the next plugin i eval that template so i can shortcode it into another template, like so: Code:
<plugin active="1">
<title>cache templates</title>
<hookname>cache_templates</hookname>
<phpcode><![CDATA[
$globaltemplates = array_merge($globaltemplates, array('drc_lf_css'));
]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>global templates</title>
<hookname>global_start</hookname>
<phpcode><![CDATA[
eval('$drcextcss = "' . fetch_template('drc_lf_css') . '";');
]]></phpcode>
</plugin>
so im just wondering. when is there the need to cache a template? I always thought they needed to be cached |
|
#2
|
||||
|
||||
|
If you don't cache the templates, each non cached template is another db query
|
|
#3
|
||||
|
||||
|
so like i thought, always cache the template
|
|
#4
|
||||
|
||||
|
Yes, always. If you have your dev site in debug mode you'll see any templates that aren't cached labelled in red.
|
| Благодарность от: | ||
| Dr.CustUmz | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|