PDA

View Full Version : About caching templates.


Seductor
09-04-2012, 01:14 PM
Hello:

I have read this:
https://vborg.vbsupport.ru/showthread.php?t=228078

And it says:
Among the debug info is a list of all templates called, and non-cached templates will show up in red.

I did what it says and I have added a plugin at hook cache_templates for my BESTUSERS template:
https://vborg.vbsupport.ru/external/2012/09/50.png

I have tried to look if it is cached:
https://vborg.vbsupport.ru/external/2012/09/51.png

And well, it is not shown up in red, so I think it is cached. But for my surprise, I have checked another templated which I did not cached previously, GLOSTLSIT, and I found this:
https://vborg.vbsupport.ru/external/2012/09/52.png

It is not shown up in red too! So, how is it possible? How can it be cached If I did not add any plugin to cache_template telling to do it?

Am I doing something wrong?

Thanks in advance.

kh99
09-04-2012, 02:01 PM
I notice that the "Included Files" list on the right contains gloslist.php, is it possible that something in that file is arranging for it to be cached?

Seductor
09-04-2012, 02:29 PM
I notice that the "Included Files" list on the right contains gloslist.php, is it possible that something in that file is arranging for it to be cached?

Could it be the pre-cache? I took a template from here:
https://vborg.vbsupport.ru/showthread.php?t=62164
But never cared about the pre-cache. Could it be that?

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array('GLOSLIST',
);

// pre-cache templates used by specific actions
$actiontemplates = array();

kh99
09-04-2012, 02:33 PM
Yes, that's it. Any templates listed there get cached.