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
  #32  
Old 07-24-2011, 10:10 PM
Neo_obs Neo_obs is offline
 
Join Date: Mar 2006
Location: Disneyland, CA
Posts: 363
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't have Xcache installed or configured correctly.
Reply With Quote
  #33  
Old 07-26-2011, 04:10 PM
SnakeV SnakeV is offline
 
Join Date: Jun 2008
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheComputerGuy View Post
I +1 for 3.8
+1 for 3.8x
Reply With Quote
  #34  
Old 08-25-2011, 06:04 AM
prandah's Avatar
prandah prandah is offline
 
Join Date: Jun 2010
Location: Indonesia
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i get somwe error
my question how to install xcache on nginxcp proxy?
Reply With Quote
  #35  
Old 08-25-2011, 08:10 AM
TeknoSounds TeknoSounds is offline
 
Join Date: Nov 2006
Location: TX
Posts: 435
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by prandah View Post
i get somwe error
my question how to install xcache on nginxcp proxy?
http://www.google.com/search?q=xcach...ient=firefox-a
Reply With Quote
  #36  
Old 09-14-2011, 11:46 AM
prandah's Avatar
prandah prandah is offline
 
Join Date: Jun 2010
Location: Indonesia
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello,
i was install xache on myserver ( cpanel ) via easy apache
but plugin can't install correctly ?
Reply With Quote
  #37  
Old 09-15-2011, 03:00 AM
TeknoSounds TeknoSounds is offline
 
Join Date: Nov 2006
Location: TX
Posts: 435
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by prandah View Post
hello,
i was install xache on myserver ( cpanel ) via easy apache
but plugin can't install correctly ?
more details?
what is the error you get?
Reply With Quote
  #38  
Old 09-15-2011, 07:18 AM
prandah's Avatar
prandah prandah is offline
 
Join Date: Jun 2010
Location: Indonesia
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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/ditusuk/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_reply] => 1 reply,[1_week_ago] => 1 Week Ago,[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,[admin] => Admin,[admin_control_panel] => Admin Control Panel,[admin_required_register] => The administrator may have required you to register before you can view this page.,[administrative] => Administrative,[administrator_decided_x_quiet] => The administrator has decided that %1$s should be quiet for a while.,[administrator_may_disabled_account] => If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.,[ads_ct_forum_select] => Hold down the [Ctrl]-Key for multiple selections,[ads_ct_joindate] => Always,[ads_ct_location] => Advertising world,[ads_ct_npost] => Many,[ads_ct_usertitle] => Circuit advertisement,[advanced_search] => Advanced Search,[age] => Age,[albums] => Albums,[alert_board_off] => Alert: The forums are currently turned off!,[all] => All,[all_forums] => All Forums,[all_times_are_gmt_x_time_now_is_y] => All times are GMT +8. The time now is 04:20 PM.,[allow_bbcode] => Allow BB Code,[allow_html] => Allow HTML,[allow_img_code] => Allow [IMG] Code,[allow_smilies] => Allow Smilies,[announcement] => Announcement,[announcements] => Announcements,[announcements_in_forum] => Announcements in Forum,[any_prefix_meta] => Any Prefix,[april] => April,[archive] => Archive,[at] => at,[attached_files] => Attached Files,[attached_images] => Attached Images,[attached_thumbnails] => Attached Thumbnails,[attachment] => Attachment,[attachment_statistics] => Attachment Statistics,[attachments] => Attachments,[august] => August,[author] => Author,[back_to_x_profile] => Back to %1$s's Profile,[bb_code_is_x] => BB code is %2$s,[bbcode_allowed] => BB Code Allowed,[bbcode_not_allowed] => BB Code is not allowed,[become_a_friend] => Become a Friend,[befriend_x] => Befriend %1$s,[bop5_share_this_forum] => Share This Forum,[by_x] => by %2$s,[by_x_guest] => by %1$s,[by_x_memberaction] => by %1$s,[by_x_user_on_y_date] => %2$s on %3$s,[by_xlink_yguest] => by %2$s,[bytes] => Bytes,[calendar] => Calendar,[can_moderate_user_signatures] => Can Moderate User Signatures,[cancel] => Cancel,[cancel_changes] => Cancel Changes,[cant_identify_image] => Can't identify the image? Click it to get a new one.,[caps_lock_is_on] => Caps Lock is on!
but 'm sure i was installed xcached correctly
Reply With Quote
  #39  
Old 09-16-2011, 01:31 AM
TeknoSounds TeknoSounds is offline
 
Join Date: Nov 2006
Location: TX
Posts: 435
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well according to that error, its either not installed correctly or not pointing to the correct place.

According to a phpinfo page is xcache showing up?

Are you able to bring up the XCache Admin page and perform cache clears?

Did you set vbulletin to use xcache in its config?
Reply With Quote
  #40  
Old 09-19-2011, 05:22 AM
prandah's Avatar
prandah prandah is offline
 
Join Date: Jun 2010
Location: Indonesia
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TeknoSounds View Post
Well according to that error, its either not installed correctly or not pointing to the correct place.

According to a phpinfo page is xcache showing up?

Are you able to bring up the XCache Admin page and perform cache clears?

Did you set vbulletin to use xcache in its config?
no, how and where i set it ?
Reply With Quote
  #41  
Old 09-19-2011, 01:03 PM
TeknoSounds TeknoSounds is offline
 
Join Date: Nov 2006
Location: TX
Posts: 435
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

first thing first, create a phpinfo page.

PHP Code:
<?php phpinfo(); ?>
Put it somewhere in the public side of your website (like the root of it) and bring it up. Then do a Find on Xcache. You should see something similar to:
Code:
XCache
XCache Support	enabled
Version 	1.3.0
Modules Built 	cacher
Readonly Protection 	N/A
Cache Init Time 	2011-09-19 06:15:06
Cache Instance Id 	1723
Opcode Cache 	enabled, 134,217,728 bytes, 4 split(s), with 8192 slots each
Variable Cache 	enabled, 134,217,728 bytes, 4 split(s), with 8192 slots each
Shared Memory Schemes 	mmap
If you don't, you don't have xcache installed properly.
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 11:22 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.05002 seconds
  • Memory Usage 2,350KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (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
  • (3)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