View Full Version : queries for uncached templates
Cold Steel
06-03-2004, 11:05 PM
Is there a way to get rid of these?
Zachery
06-03-2004, 11:09 PM
Depends on what and where, where are these uncache templates appearing
insanctus
06-03-2004, 11:09 PM
Yes add them to the file as pre cached , in the php in question
If it is used on every call add it in $globaltemplates other wise $actiontemplates
Cold Steel
06-03-2004, 11:14 PM
I installed a hack from here that lets me see how many queries each page is generating. For example at arcade.php I see
Page generated in 0.67593 seconds with 27 queries (9 queries for uncached templates) [Server Loads: 1.51 1.39 : 1.65]
If anyone else is using the v3arcade, how and where do you add them as precached?
insanctus
06-03-2004, 11:19 PM
You would have to go into debug mode, then see what all templates are not cached, in arcade home (has not changed anything) I have no uncached.
You would have to show us a debug report with the templates that are not cached.
Cold Steel
06-03-2004, 11:48 PM
I've gone into debug mode, but I don't see anything extra.
Where should I see the debug information?
Zachery
06-03-2004, 11:49 PM
I've gone into debug mode, but I don't see anything extra.
Where should I see the debug information?
there should be a bunch of text at the bottom listing each template.
insanctus
06-03-2004, 11:49 PM
Under the footer Template Usage
:) the ones not cached be highlighted
Cold Steel
06-03-2004, 11:59 PM
I must be retarded.
I don't see anything, still.
http://forums.asiansinc.com
Where exactly should I be looking?
Zachery
06-04-2004, 12:00 AM
I must be retarded.
I don't see anything, still.
http://forums.asiansinc.com
Where exactly should I be looking?
How did you enable debug mode? it can only be enabled in config.php
insanctus
06-04-2004, 12:02 AM
Hmm I can not see the debug at footer..... you put debug on via config.php right?
Here is a screen of mine
Cold Steel
06-04-2004, 12:07 AM
I did it in the admincp. vBulletin Options > General Settings > Add Template Name in HTML Comments
Where in config.php would it be?
These are the only options I have in my config.php:
// ****** DATABASE SERVER NAME ******
// ****** DATABASE USERNAME & PASSWORD ******
// ****** DATABASE NAME ******
// ****** TECHNICAL EMAIL ADDRESS ******
// ****** PERSISTENT CONNECTIONS ******
// ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
// ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
// ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
// ****** UNDELETABLE / UNALTERABLE USERS ******
// ****** SUPER ADMINISTRATORS ******
Cold Steel
06-04-2004, 12:08 AM
Ok did a search on vB.com and saw http://www.vbulletin.com/forum/showthread.php?t=100344&highlight=debug
Going to add to script right now...
Cold Steel
06-04-2004, 12:10 AM
Ok I see it. In arcade.php the uncached templates are
ARCADE (1)
arcade_header (1)
arcade_main (1)
arcade_main_alerts (1)
arcade_main_alerts_bit (1)
arcade_main_games_bit (10)
arcade_main_news (1)
arcade_main_news_bit (4)
arcade_main_welcome (1)
Will caching them improve performance, and if so, how do I go about caching them?
insanctus
06-04-2004, 12:33 AM
You may wish to redownload the hack, due to same hack and I do not have any uncashed.
Cold Steel
06-04-2004, 12:41 AM
Hmm. I seem to have a couple extra lines in my arcade.php - probably from an arcade hack.
This is not in the original arcade.php:
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// pre-cache templates used by all actions
$globaltemplates = array();
Would that cause my templates to get uncached?
I have another hack on my forumhome (random arcade game) that also isn't cached. Any idea how I would cache that?
insanctus
06-04-2004, 01:02 AM
By $_GET[do] == "main" ) {
Under that you should have
$globaltemplates = array(
'ARCADE',
'arcade_header',
'arcade_main',
'arcade_main_alerts',
'arcade_main_alerts_bit',
'arcade_main_games_bit',
'arcade_main_news',
'arcade_main_news_bit',
'arcade_main_welcome'
);
Cold Steel
06-04-2004, 01:58 AM
I have that:
// ######################### MAIN ARCADE PAGE ############################
if ($_GET['do'] == "main") {
// pre-cache templates used by all actions
$globaltemplates = array(
'ARCADE',
'arcade_header',
'arcade_main',
'arcade_main_alerts',
'arcade_main_alerts_bit',
'arcade_main_games_bit',
'arcade_main_news',
'arcade_main_news_bit',
'arcade_main_welcome'
);
require_once('./global.php');
require_once('./includes/functions_user.php');
require_once('./includes/functions_arcade.php');
if ($arcadegeneral['challengescores'] == 1) {
$sessionclause = "sessiontype IN (1,2)";
} else {
$sessionclause = "sessiontype=1";
}
$navbits = array();
$navbits[""] = "Arcade";
:confused:
Cold Steel
06-06-2004, 01:07 AM
You guys have been very helpful thus far -- can you help me a little bit more? (bump)
Cold Steel
06-12-2004, 03:55 PM
Bump. How can I cache templates?
Zachery
06-12-2004, 04:06 PM
add them to the $globaltemplates = array(
:)
Cold Steel
06-19-2004, 07:04 PM
Got it. Thanks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.