Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2014, 03:14 AM
findingpeace's Avatar
findingpeace findingpeace is offline
 
Join Date: Nov 2011
Posts: 268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Template caching doesn't seem to be working

In my config.php file, I have the following line enabled:

Code:
$config['Datastore']['class'] = 'vB_Datastore_XCache';
Server shows xcache installed:

Code:
PHP 5.4.20 (cli) (built: Oct 14 2013 16:02:24)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with XCache v3.0.3, Copyright (c) 2005-2013, by mOo
    with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd.
    with XCache Cacher v3.0.3, Copyright (c) 2005-2013, by mOo
Caching isn't disabled in ACP-->Options-->Server/Optimization Options.

So here's the problem - I have many templates cached via plugins in the cache_templates hook like so:

Code:
$cache[] = 'mytemplate';
But these templates aren't caching at all. For example, I have the "DBTech Thank You Hack" installed (shows recent "Thanks" in a memberinfo tab), so I tried refreshing on the memberinfo page every few seconds, but the debugger still shows the same number of queries. I don't have any new "Thanks" but it's still running 20 big queries on the same 20 recent members who thanked me. All just to get their username and post link (which it should already have in cache from my refresh moments ago!)

Every single refresh, it runs this query 20 times:

Code:
SELECT 
	userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate, user.languageid AS saved_languageid,
	IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline, customavatar.width AS avwidth, customavatar.height AS avheight, customavatar.height_thumb AS avheight_thumb, customavatar.width_thumb AS avwidth_thumb, customavatar.filedata_thumb
	, bu.bloguserid, bu.entries, bu.options AS blog_options, bu.subscribeown AS blog_subscribeown, bu.memberids, bu.memberblogids,
bu.subscribeothers AS blog_subscribeothers, bu.title AS blog_title, bu.description AS blog_description, bu.allowsmilie AS blog_allowsmilie, bu.draft AS blog_draft, bu.pending AS blog_pending, bu.options_member, bu.options_guest, bu.options_buddy, bu.options_ignore, bu.uncatentries, bu.moderation AS blog_moderation, bu.deleted AS blog_deleted, bu.akismet_key AS blog_akismet_key, isblogmoderator, bu.comments_moderation AS blog_comments_moderation, bu.lastblog, bu.lastblogid, bu.lastblogtitle, bu.categorycache, bu.tagcloud, bu.sidebar, bu.custompages, bu.customblocks, blockparsed.blocktext, 1 AS blogstyleid, blog_usercsscache.csscolors AS blog_csscolors, blog_usercsscache.cachedcss AS blog_cachedcss, IF(blog_usercsscache.cachedcss IS NULL, 0, 1) AS blog_hascachedcss, blog_usercsscache.buildpermissions AS blog_cssbuildpermissions, gm.permissions AS grouppermissions, ignored.relationid AS ignoreid, buddy.relationid AS buddyid, IF(blog_subscribeuser.blogsubscribeuserid, 1, 0) AS blogsubscribed, customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline, customprofilepic.width AS ppwidth, customprofilepic.height AS ppheight
FROM vbuser AS user
LEFT JOIN vbuserfield AS userfield ON (user.userid = userfield.userid)
LEFT JOIN vbusertextfield AS usertextfield ON (usertextfield.userid = user.userid) LEFT JOIN vbavatar AS avatar ON (avatar.avatarid = user.avatarid) LEFT JOIN vbcustomavatar AS customavatar ON (customavatar.userid = user.userid) 

LEFT JOIN vbblog_user AS bu ON (bu.bloguserid = user.userid)
LEFT JOIN vbblog_custom_block_parsed AS blockparsed ON (blockparsed.userid = user.userid AND blockparsed.styleid = 1 AND blockparsed.languageid = 1)
LEFT JOIN vbuserlist AS ignored ON (ignored.userid = user.userid AND ignored.relationid = 1 AND ignored.type = 'ignore')
LEFT JOIN vbuserlist AS buddy ON (buddy.userid = user.userid AND buddy.relationid = 1 AND buddy.type = 'buddy')
LEFT JOIN vbblog_groupmembership AS gm ON (user.userid = gm.bloguserid AND gm.userid = 1)
LEFT JOIN vbblog_subscribeuser AS blog_subscribeuser ON (user.userid = blog_subscribeuser.bloguserid AND blog_subscribeuser.userid = 1)
LEFT JOIN vbblog_usercsscache AS blog_usercsscache ON (user.userid = blog_usercsscache.userid)
LEFT JOIN vbcustomprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)
WHERE user.userid = #### LIMIT 1
Add on the tags/quotes mod, and my member info page gets REALLY slow.

Shouldn't template caching ultimately result in fewer queries every few reloads?

Thanks!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:35 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06744 seconds
  • Memory Usage 2,214KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete