How to Cache an Uncached Template
I am posting this because it took me so long to find the answer. It may be elementary to those of you who have been doing this for a while, but not to me.
Anyway, here goes: Open /forum_root/global.php Find: PHP Code:
PHP Code:
|
Good tip, Dennis. :)
However I'm pretty sure you should only do that for templates that are used on every page of your site. You can conserve memory by adding page specific and action specific templates to the $globaltemplates and $actiontemplates arrays (respectively) at the beginning of the file that uses them instead of adding them to global.php. Profile.php and usercp.php are good files to look at to see examples of this. |
Quote:
|
Quote:
|
I think Zac only read the opening line to your post :p
- Zero Tolerance |
I believe there're at least 2 threads for this...
|
Quote:
Quote:
|
Quote:
Quote:
|
I stumbled on this post at vb.com earlier tonight. It's a couple years old but as far as I know it's still relevant. It gives a little more detail about the purpose of the different template arrays. :)
|
Quote:
try to help out a bit more, instead of bunging up witty repartee. if it was funny i wouldnt mind... |
thanks for that great hack
but the templates are not cached, how to cache the template Powered by vBulletin® Version 3.8.3, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. Page generated in 0.52030 seconds with 28 queries (2 queries for uncached templates) Uncached templates: nlp_notifications_usercp (1) Uncached templates: nlp_notifications_usercp_bit (1) |
I am pretty sure there is a more recent version of this article that shows how to cache the templates using plugins.
|
Quote:
PHP Code:
|
Quote:
|
Quote:
|
Quote:
PHP Code:
PHP Code:
|
Quote:
Quote:
|
Yes, you need to create a plugin to cache the templates.
|
perfect! runs correctly! :) as always thanks Lynne for the tips ;)
|
All times are GMT. The time now is 11:33 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|