Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Load templates from XCache Details »»
Load templates from XCache
Version: 1.0.0 Beta, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: Board Optimization - Version: 4.1.0 Rating:
Released: 12-26-2010 Last Update: 01-05-2011 Installs: 36
DB Changes
Additional Files Is in Beta Stage  
No support by the author.

By default vBulletin loads templates out of the database which means that all templates that are required on a page must be loaded ("cached") before the first template gets rendered.

If a template is not cached an additional dataase query is required.

This Add-on loads templates from XCache on demand, completely emiminating the need for database reads after an initial pageload.

By loading templates on demand only those templates that are really being used on a page will be loaded into memory, so theoretically this Add-on should
  • Decrease memory footprint
  • Decrease page creation time (as loading data from a shared memory storage like XCache is faster than DB access)
  • Remove 1+X (X = amount of uncached templates) queries per page

How is that different to other existing tools like vBOptimise?
Most existing tools (at least the ones I know of) load all templates upfront, just like vBulletin would do if the DB is used.
This means that only those templates that are explicitly cached will be loaded from the cache, uncahed templates will cause additional database queries.

Can I use this Add-on my hared Webhosting?
Most likely not as it requires XCache with variable caching enabled which is usually not the case on shared hosts

I use multiple webservers, is that a problem?
It should work just fine with multiple webservers but that has not been tested so far.

Are there any other drawbacks?
Yes, this Add-on might be (be is not necessarily) incompatible with Add-ons that manipulate the template cache at runtime (which is a technique that is genreally deprecated).

History
1.0.0 Beta 1
First Public Release

1.0.0 Beta 2
  • Fixed incorrect variable initialisation that caused problems with other Add-ons that manipulate the template cache
    Important: Such techniques (like using str_replace(), etc.) are deprecated and it is strongly advised not to use Add-ons that do such auto-template changes.
  • Increased Plug-in execution order to the maximum to ensure all Templates cached via Plug-ins are grabbed

1.0.0 Beta 3
  • Fixed missing global in Hook template_compile
  • Added prefix setting to config.php

Download Now

File Type: zip xcachtemplates_1-0-0_Beta_1.zip (3.6 KB, 49 views)
File Type: zip xcachtemplates_1-0-0_Beta_2.zip (3.9 KB, 41 views)
File Type: zip xcachtemplates_1-0-0_Beta_3.zip (3.7 KB, 340 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
cherylferraro

Comments
  #22  
Old 01-10-2011, 04:23 PM
ImmortalForums ImmortalForums is offline
 
Join Date: Feb 2007
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

blog_postbit_blog_link
blog_postbit_entries_link
postbit_ip
threadadmin_imod_menu_post

Not getting cached and its causing certain users on my forums to not be able to see threads. If I log in as the user I can see the threads though.
Reply With Quote
  #23  
Old 01-12-2011, 07:11 PM
oddmud's Avatar
oddmud oddmud is offline
 
Join Date: Oct 2009
Location: Canada
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rob01 View Post
cant use XCache

shared hosting :S
my shared hosting has xcache.
Reply With Quote
  #24  
Old 01-13-2011, 09:37 AM
hilfe-forum hilfe-forum is offline
 
Join Date: Sep 2005
Location: http://www.alpha-board.eu
Posts: 198
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm not work for me...


Quote:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/includes/class_core.php(4429) : eval()'d code on line 1
Reply With Quote
  #25  
Old 05-06-2011, 10:00 PM
gibigbig gibigbig is offline
 
Join Date: Jul 2007
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working on vb 4.1.3 with vboptimise enabled

white screens mayyyn
Reply With Quote
  #26  
Old 05-31-2011, 02:04 AM
hilfe-forum hilfe-forum is offline
 
Join Date: Sep 2005
Location: http://www.alpha-board.eu
Posts: 198
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Help please

Quote:
[Tue May 31 05:00:04 2011] [error] [client 92.226.138.146] PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/includes/class_core.php(4448) : eval()'d code on line 1, referer: http://www.xxx.de/
Reply With Quote
  #27  
Old 05-31-2011, 02:21 AM
fabiocesar fabiocesar is offline
 
Join Date: Nov 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gibigbig View Post
not working on vb 4.1.3 with vboptimise enabled

white screens mayyyn

disable all option with vboptimise.. xD
Reply With Quote
  #28  
Old 06-14-2011, 05:59 PM
Neo_obs Neo_obs is offline
 
Join Date: Mar 2006
Location: Disneyland, CA
Posts: 363
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting a problem with sending new private messages in 4.1.4 anyone else?

Is vboptimise good? I had issues before.
Reply With Quote
  #29  
Old 07-02-2011, 12:51 AM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I +1 for 3.8
Reply With Quote
  #30  
Old 07-02-2011, 09:33 PM
cherylferraro cherylferraro is offline
 
Join Date: Oct 2005
Location: California
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working for me on 4.1.4.

Great mod, thank you for sharing it.
Reply With Quote
  #31  
Old 07-24-2011, 02:03 AM
washingtonboise washingtonboise is offline
 
Join Date: Mar 2009
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

4.1.4. PL2, fully patched and up to date.

Attempted install. Got fatal error message followed by about 30 pages of verbose text.

Quote:
Fatal error: Xcache not installed in [path]/includes/adminfunctions_plugin.php(931) : eval()'d code on line 3
#0 vb_error_handler(256, Xcache not installed, /home/rpgresel/public_html/includes/adminfunctions_plugin.php(931) : eval()'d code, 3, Array ([xml] => This Add-on uses XCache to cache templates 1.0.0 Beta 3 '); require_once(DIR . '/includes/class_dbalter.php'); $dbalter = new vB_Database_Alter_MySQL($db); echo('
Altering Table style ...'); vbflush(); $dbalter->fetch_table_info('style'); $dbalter->add_field(array ( 'name' => 'revision', 'type' => 'INT', 'length' => '11', 'null' => false, 'default' => NULL, )); echo('Done!
'); vbflush(); echo(''); vbflush();]]> '); require_once(DIR . '/includes/class_dbalter.php'); $dbalter = new vB_Database_Alter_MySQL($db); echo('
Altering Table style ...'); vbflush(); $dbalter->fetch_table_info('style'); $dbalter->drop_field('revision'); echo('Done!
'); vbflush(); echo(''); vbflush();]]> cache_templates templatecache = new TemplateCache_XCache($cache, $vbulletin, $GLOBALS['style']);]]> template_compile db->shutdown_query("UPDATE " . TABLE_PREFIX . "style SET revision = revision + 1", 'stylerevision');]]> ,[allow_overwrite] => 1,[vbphrase] => Array ([1_day_ago] => 1 Day Ago,[1_hour_ago] => 1 Hour Ago,[1_minute_ago] => 1 Minute Ago,[1_week_ago] => 1 Week Ago,[VSa_APBOUPC] => VSa - Advanced Permissions Based on Post Count,[a_closed_forum] => A Closed Forum,[accept] => Accept,[action] => Action,[active_members] => Active Members,[active_subscriptions] => Active Subscriptions,[add_as_contact] => Add as Contact,[add_as_friend] => Add as Friend,[add_new_folders] => Add New Folders,[add_subscription] => Add Subscription,[add_x_to_contacts] => Add %1$s to Your Contacts,[adjust] => Adjust,[admin] => Admin,[admin_control_panel] => Admin Control Panel,[admin_required_register] =>
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 07:11 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.05926 seconds
  • Memory Usage 2,343KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (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_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
  • 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
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete