vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to Cache an Uncached Template (https://vborg.vbsupport.ru/showthread.php?t=81545)

dsboyce8624 05-15-2005 10:00 PM

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:

//misc useful 

At the end of the column of template names add yours, don't forget the comma after the last one that's already there, like so:

PHP Code:

'already_there_template',
'template_you_need_cached' 


zetetic 05-24-2005 11:50 PM

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.

Zachery 05-25-2005 02:00 AM

Quote:

Originally Posted by tmhall
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.

Not all templates should be cached globally however.

zetetic 05-25-2005 04:04 PM

Quote:

Originally Posted by Zachery
Not all templates should be cached globally however.

Isn't that what I just explained, or do you mean something else?

Zero Tolerance 05-25-2005 05:10 PM

I think Zac only read the opening line to your post :p

- Zero Tolerance

deathemperor 05-25-2005 05:34 PM

I believe there're at least 2 threads for this...

zetetic 05-25-2005 06:56 PM

Quote:

Originally Posted by Zero Tolerance
I think Zac only read the opening line to your post :p

I hope so! I thought I was going crazy. :D

Quote:

Originally Posted by deathemperor
I believe there're at least 2 threads for this...

I don't think we're in danger of having too many useful threads here. :)

dsboyce8624 05-30-2005 05:33 AM

Quote:

Originally Posted by deathemperor
I believe there're at least 2 threads for this...

Well, I couldn't find them. I found this info in the instructions for a hack.

Quote:

Originally Posted by tmhall
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.

I will have to check this out. As I said above, I'm new to this. Everybody I asked about it said "Go ask whoever wrote the hack" and the hack was very old and unsupported. So I figured it out. But with your statement in here, I guess all the info is now available in one place! :banana:

zetetic 05-30-2005 06:05 AM

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. :)

Gizmo5h1t3 08-14-2005 08:35 PM

Quote:

Originally Posted by deathemperor
I believe there're at least 2 threads for this...

then post the links for em, coz i cant find em mate.

try to help out a bit more, instead of bunging up witty repartee.
if it was funny i wouldnt mind...


All times are GMT. The time now is 06:08 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
  • Page Generation 0.01569 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete