Version: 1.0.0 Beta, by Andreas
Developer Last Online: Jan 2023
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
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!
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.