Log in

View Full Version : Uncaching Templates


PET
02-19-2005, 10:02 PM
Hi,

after installing 3.0.6 my vBadvanced index page has :

Page generated in 2.63653207 seconds (15.54% PHP - 84.46% MySQL) with 39 queries
DEBUG Mode OFF | GZIP ON (level 1) | 0.80 : 1.13 : 1.41 | 20 Uncached Templatesadv_portal (1)adv_portal_buddylist (1)adv_portal_calendar (1)adv_portal_footer (1)adv_portal_latesttopicbits (10)adv_portal_latesttopics (1)adv_portal_news_archive (1)adv_portal_news_archivebits (3)adv_portal_newsbits (3)adv_portal_onlineusers (1)adv_portal_poll (1)adv_portal_pollresult (4)adv_portal_search (1)adv_portal_stats (1)adv_portal_welcomeblock (1)board_inactive_warning (1)calendar_smallmonth_day (28)calendar_smallmonth_day_other (7)calendar_smallmonth_header (1)calendar_smallmonth_week (5)footer (2)forumhome_loggedinuser (4)gobutton (1)header (1)headinclude (1)navbar (1)option (7)phpinclude_start (1)spacer_close (1)spacer_open (1)threadbit_pagelink (40)timezone (1)username_loggedin (1)vbookie_vbadvanced_latestevents (1)


39 QUERIES ?????

Now, my question is, how can i CACHE my templates ?

thanks

AN-net
02-20-2005, 12:41 AM
in the file with the cached templates place this above the call for global.php:

$globaltemplates= array(
'templatenamegoeshere',
'2ndtemplate'
'etc.',
));


or if the $globaltemplates variable already exists simply add to it;)

that should get rid of the extra queries and uncached templates

PET
02-20-2005, 06:30 PM
thanks. I found it yesterday. Every file has that variabile where you put the templates :) Now...back to 19 queryes :D

dsboyce8624
05-14-2005, 07:03 PM
Is there one file this can be added to that will do it globally?

deathemperor
05-14-2005, 08:48 PM
Is there one file this can be added to that will do it globally?
some sholdn't be added globally, like why would you have a postbit template in the forum index and the profile ?

only navbar, header, footer, etc