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

Reply
 
Thread Tools
Template Cache Details »»
Template Cache
Version: 0.0.4, by lendy lendy is offline
Developer Last Online: Feb 2023 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.6.4 Rating:
Released: 02-11-2007 Last Update: 02-25-2007 Installs: 55
Uses Plugins
Additional Files  
No support by the author.

This mod is for larger vBulletin installations that have problems with server load (to be run together with an opcode cache). Smaller installations will usually see no performance improvement.Speed up your Forums & Save Bandwidth

Reference

Plugin Based Template Cache
https://vborg.vbsupport.ru/showthread.php?t=121876

Compress Forum Templates
https://vborg.vbsupport.ru/showthread.php?t=107615

Require

Must install one of
1. APC,PECL,Visit:http://pecl.php.net/apc
2. eAccelerator,fork of the Turck MMCache,Visit:http://eaccelerator.net/
3. Turck MMCache,Visit:http://sourceforge.net/projects/turck-mmcache
4. Xcache,Lighttpd,Visit:http://trac.lighttpd.net/xcache/



Upgrade

1. Disable the product (Plugin System -> Manage Products -> Template Cache Options -> Disable)
2. Upload the new includes/template_cache.php
3. Import the new product-template_cache.xml (Allow Overwrite: YES)
4. Enable the product

Installation

1. Upload includes/template_cache.php to your forum
2. Install the product-template_cache.xml
3. Check and select which cache type? APC,eAccelerator,Turck MMCache,Xcache
4. Enable the product
5. vBulletin Options -> vBulletin Options -> Template Cache Options -> Modify the settings (especially enabling it).

Deinstallation

1. Disable the product
2. Remove the product
3. Check the 4 plugins of this product are gone
4. Delete includes/template_cache.php
5. Clear your PHP cache if you are using any.

Common Templates That May Need To Be Added to Ignore Settings:
phpinclude_start phpinclude_end editor_jsoptions_font editor_jsoptions_size forumhome navbar forumhome_vbshout forumhome_vbshout_shout


What it does:

1. hook "cache_templates",get $globaltemplates from cache,if not(Exclude Templates),get template from cache_templates();the cache use one of APC,eAccelerator,Turck MMCache,Xcache.Reduce MYSQL query and DISK IO.

2. There is an option to have certain templates saved seperatly to memory.

3. Automatically clears the cache when modifying or inserting templates, done using the hook admin_global and a check of $_GET, and also clearing when modifying the options.


The cache memory only get created when they are needed the first time. The memory can get one megabytes in size, mine is 0.5mb (default installation, no plugins/hacks). If you have new templates/styles and several plugins it can get 1-2mb no problem.if you use compress template,it will smaller.

notice
eAccelerator:
The shm functionshave been disabled by default;Take a look at configure --help for more information. see: http://eaccelerator.net/ticket/95
Xcache:
in php.ini or xcache.ini
set xcache.var_size not 0,same as xcache.size

Updates

Version 0.0.4:
26th Feb 2007, Change check if install shm,function_exists(info to put);The shm functionshave been disabled by default in eAccelerator.
Version 0.0.3:
12th Feb 2007, add Compress Template.
Version 0.0.2:
11th Feb 2007, add cache Xcache,delete cache File.
Version 0.0.1:
10th Feb 2007, work with APC,eAccelerator,Turck MMCache,File in 3.6.4.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 02-26-2007, 04:07 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



i used 96MB for Xcache
and 16 MB for var.cache

but i will make xcche to 64MB
and var cache 0 . Coz afaik var cache wont work with vb.
but ur screenshot ..seems ur var cache is working ?
How?
Reply With Quote
  #33  
Old 02-26-2007, 04:09 AM
lendy lendy is offline
 
Join Date: Mar 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

xcache.var_size = 64M

few day ago,you see


then change to use
xcache.size
xcache.var_size

enough memory for xcache ,not waste.
Reply With Quote
  #34  
Old 02-26-2007, 04:14 AM
lendy lendy is offline
 
Join Date: Mar 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

see list var data as
Reply With Quote
  #35  
Old 02-26-2007, 04:32 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is the var.cache is working only for ur hack?
really strange....no other changes are needed?
how much
gc_varcache_interval = how many second did u put?

caching var its also saving query? save (1~2 ) query in every page?
Reply With Quote
  #36  
Old 02-26-2007, 04:55 AM
lendy lendy is offline
 
Join Date: Mar 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zia View Post
is the var.cache is working only for ur hack?
really strange....no other changes are needed?
how much
gc_varcache_interval = how many second did u put?

caching var its also saving query? save (1~2 ) query in every page?
gc_varcache_interval :
i set default
it is not import.
it is cron job every gc_varcache_interval seconds scanning expired items.
if server cpu is good,or Load Average is low.you can set small.i thank 1 day is good.

save 1 query in every page.
Reply With Quote
  #37  
Old 02-26-2007, 09:07 AM
goyo goyo is offline
 
Join Date: Mar 2002
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great work lendy! :up:

Works as described with xcache.
Reply With Quote
  #38  
Old 02-26-2007, 02:42 PM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by goyo View Post
Great work lendy! :up:

Works as described with xcache.
do u mind post ur screen shot of Xcache status?
Reply With Quote
  #39  
Old 02-27-2007, 12:08 AM
lendy lendy is offline
 
Join Date: Mar 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Attachment 61099
Variable Cache is disabled.

if set Variable Cache value
this value same as Opcode Cache.
Attachment 61100
Reply With Quote
  #40  
Old 02-27-2007, 04:11 PM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lendy View Post
Attachment 61099
Variable Cache is disabled.

if set Variable Cache value
this value same as Opcode Cache.
Attachment 61100
bro thnx .
actually i asked goyo to give his one.

Thnx
Reply With Quote
  #41  
Old 03-03-2007, 06:33 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Helo Lendy,
Using Xcache + this hack. its caching var. (shown as var.cache)
actually its caching var?

what is the difference between urs & THis One

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 05:34 AM.


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.05830 seconds
  • Memory Usage 2,310KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete