vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Template Cache (https://vborg.vbsupport.ru/showthread.php?t=139151)

lendy 02-11-2007 10:00 PM

Template Cache
 
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.

thincom2000 02-12-2007 04:00 AM

So how is this copy & paste thread an improvement over orban's Plugin Based Template Cache?

Looking at the code, this seems to have more direct play with the opcode cache. What does this do and what are the advantages?

lendy 02-12-2007 04:07 AM

Cache Not with file,It use:
one of:
1. APC
2. eAccelerator
3. Turck MMCache
4. Xcache

put/get template with memory,Reduce MYSQL query and DISK IO.

Snake 02-12-2007 07:47 AM

Thanks for this! :)

Zia 02-12-2007 07:51 AM

wel....
whats the diff. between urs & orbans hack?
orbans one template cacher ..work with or w/p apc/ea/......
but with any opcode cacher it works fine....

what does ur hack will do?
cached in memory or accelerated php? or cache data store ?

Quote:

Version 0.0.3:
12th Feb 2007, add Compress Template.
umm that means this hack will compress templates too? in the screen shot there are no option are shown for compress.

kinda 2-in-1 ?

lendy 02-12-2007 09:10 AM

Quote:

Originally Posted by Zia (Post 1180472)
wel....
whats the diff. between urs & orbans hack?
orbans one template cacher ..work with or w/p apc/ea/......
but with any opcode cacher it works fine....

what does ur hack will do?
cached in memory or accelerated php? or cache data store ?



umm that means this hack will compress templates too? in the screen shot there are no option are shown for compress.

kinda 2-in-1 ?

1.work good ea(mmcache)>xcache>apc

2.cached in memory with ea/apc/...

3.compress: you can enable/disable,suggest:enable;not 2-in-1,addition function.

thincom2000 02-12-2007 10:58 AM

I see. It uses less disk space when combined with a cache than orban's.

Sadly, I am not running a cache on my site, and I'm not on a dedicated so I can't just go ahead and install one. :(

bollie 02-12-2007 01:55 PM

Fatal error: APC not installed in /admincp/options.php(1027) : eval()'d code on line 13

Zia 02-12-2007 02:14 PM

Thnx for ur reply.
umm we are on a vps with 256Mb of guaranteed ram(+ 1gb Burst ram)

atm eAcclerteator installed with 32mb of Ram. No other compressor & cacheing hack (orban) installed.But its been written at vb.com any of php cacher(eA/APC/Xcache) with orbans hack..more script will be cached in memory.
(Orban using Xcache) .
i said 2-in-1 means cache + compress.Previous Hellcat & Trigunflame relased 2 compressor .Thats why i said 2 hacks in 1.

Quote:

Reduce MYSQL query and DISK IO.
Orbans one : save 1 query in every page .If "cache template separately" enabled n it demand any opcode cacher.

what about its query saving status?

in fact last few weeks im just passing my time with this shit cache & data store cache.
(lot to be learn).Lots of option.lots of opinion.

So im just trying to figure which one i will use with XCache (will move to Xcache.)

Quote:

2. There is an option to have certain templates saved seperatly to memory.
Built in option ? or custom?
Thanx in Advance.

Zia 02-12-2007 02:25 PM

Quote:

Originally Posted by bollie (Post 1180634)
Fatal error: APC not installed in /admincp/options.php(1027) : eval()'d code on line 13


yes...it will not work..unless u got any opcode cache installed
like : Apc or Xcache or eAcclereator or MMcache.
or maybe u dont have APC. But others

if ur on a shard host..request ur host provider to install any of them (maybe cant)
if ur on dedicated or vps u can install them...

or u can go for orbans one.

treasureman 02-12-2007 02:30 PM

Fatal error: Call to undefined function: eaccelerator_get() in /home/forum/public_html/includes/template_cache.php on line 65

I have eaccelerator installed and I am on a dedicated server.

Zia 02-12-2007 03:25 PM

Quote:

Originally Posted by treasureman (Post 1180666)
Fatal error: Call to undefined function: eaccelerator_get() in /home/forum/public_html/includes/template_cache.php on line 65

I have eaccelerator installed and I am on a dedicated server.


ahha....its a real probs then...

lets wait for his reply

projectego 02-12-2007 04:06 PM

Awesome! Thanks! ;)

Sofia 02-12-2007 04:27 PM

Thanks, Lendy :)

lendy 02-12-2007 11:29 PM

Quote:

Originally Posted by bollie (Post 1180634)
Fatal error: APC not installed in /admincp/options.php(1027) : eval()'d code on line 13

APC not installed
Please install APC or select other

lendy 02-12-2007 11:42 PM

Quote:

Originally Posted by treasureman (Post 1180666)
Fatal error: Call to undefined function: eaccelerator_get() in /home/forum/public_html/includes/template_cache.php on line 65

I have eaccelerator installed and I am on a dedicated server.

eaccelerator installed wrong.
i meet this.

resolvent:
not use Release-0.9.5 - 2006/10/11
use You can download a snapshot of the latest SVN repository revision here

lendy 02-13-2007 12:13 AM

Quote:

Originally Posted by Zia (Post 1180645)
Thnx for ur reply.
umm we are on a vps with 256Mb of guaranteed ram(+ 1gb Burst ram)

atm eAcclerteator installed with 32mb of Ram. No other compressor & cacheing hack (orban) installed.But its been written at vb.com any of php cacher(eA/APC/Xcache) with orbans hack..more script will be cached in memory.
(Orban using Xcache) .
i said 2-in-1 means cache + compress.Previous Hellcat & Trigunflame relased 2 compressor .Thats why i said 2 hacks in 1.


Orbans one : save 1 query in every page .If "cache template separately" enabled n it demand any opcode cacher.

what about its query saving status?

in fact last few weeks im just passing my time with this shit cache & data store cache.
(lot to be learn).Lots of option.lots of opinion.

So im just trying to figure which one i will use with XCache (will move to Xcache.)


Built in option ? or custom?
Thanx in Advance.


this one : save 1 query in every page yet.

i use APC
stats:
2007-2-12 13:16:21 -- 2007-2-13 9:48:25
total cache template:196
total use memory:444760
total hits:1293294
particular see attach file.


about apc ea xcache
apc:stably, PECL,will build in php6
ea:not stably,but capability.
xcache:neonatal,future,lighttpd project
i just ea move to apc,but use both two now.

Zia 02-13-2007 03:28 AM

Hi lendy
Thnx.

Atm we r on eAcc

with out any other hack..its working fine...
atm cached 151 scripts... (in vbPlaza enabled it cache upto 260+ scripts)
using this it will cache more cacheable script ? right ?
ummm regarding ur opinion about APC/eAcc/XCache..
thread by jason|xoxide at vbulletin.com . there found few review.
Xcache > Apc >eAcc.

i think it depends on person 2 person.



by enabling the compressor..it will stripe white spaces ?
previously faced problem using the another compressor...


------------
Any one have any practical review on it?

treasureman 02-13-2007 04:01 AM

Quote:

Originally Posted by lendy (Post 1181104)
eaccelerator installed wrong.
i meet this.

resolvent:
not use Release-0.9.5 - 2006/10/11
use You can download a snapshot of the latest SVN repository revision here

I just upgraded to latest release of eaccelerator 0.9.5. Restarted mysql and apache.

When I activate the plug in from the Admin CP I get this error:
Fatal error: Call to undefined function: eaccelerator_rm() in /home/forum/public_html/includes/template_cache.php on line 75

Although the forums work, I do get that error in the Admin CP. So I am assuming that the plug in isn't working for me, so I have uninstalled.

Zia 02-13-2007 04:12 AM

Quote:

Originally Posted by treasureman (Post 1181240)
I just upgraded to latest release of eaccelerator 0.9.5. Restarted mysql and apache.

When I activate the plug in from the Admin CP I get this error:
Fatal error: Call to undefined function: eaccelerator_rm() in /home/forum/public_html/includes/template_cache.php on line 75

Although the forums work, I do get that error in the Admin CP. So I am assuming that the plug in isn't working for me, so I have uninstalled.

hi...

ur eAcc is working ? did u check ur eAcc ACP ?

treasureman 02-13-2007 10:04 AM

Quote:

Originally Posted by Zia (Post 1181245)
hi...

ur eAcc is working ? did u check ur eAcc ACP ?

Yes my Eaccelerator is working. I checked it, I have used it for a long time, I just updated the version today. The new version is working also, just this mod gives an error.

No problem, I don't need this mod.

lendy 02-13-2007 01:14 PM

Fatal error: Call to undefined function: eaccelerator_rm()
i think it is not mod error!
must ea install problem.

You should have read the documentation and release-notes. The shm functions have been disabled by default. Take a look at configure --help for more information.

see: http://eaccelerator.net/ticket/95

treasureman 02-13-2007 02:21 PM

Quote:

Originally Posted by lendy (Post 1181498)
Fatal error: Call to undefined function: eaccelerator_rm()
i think it is not mod error!
must ea install problem.

You should have read the documentation and release-notes. The shm functions have been disabled by default. Take a look at configure --help for more information.

see: http://eaccelerator.net/ticket/95

for your info eaccelerator is installed properly and working properly. I view it in PHP info and it shows it working properly.

How do you know that I didn't read the docs and release notes?

No problem, I have uninstalled and do not need this mod.

No need to reply.

lendy 02-14-2007 12:37 AM

https://vborg.vbsupport.ru/attachmen...1&d=1171420699

Cached Files 623 ( 27.7 MBytes)
Cached Variables 1808 ( 1.8 MBytes)

vb use:
Cached Files 101 ( 15275636 Bytes)
Cached Variables 196 ( 444760 Bytes)

Cached Files <> Cached Variables
this mod use Cached Variables, Cached Files is PHP Opcode Caching auto cache.

LamBras 02-14-2007 05:17 AM

Very nice, a saved query is always welcome.
Thank you!

Zia 02-14-2007 05:17 PM

just now finished move to Xcache by Icy
gonna install it

EDIT:

istalling it..just makes my forum page blank

Zia 02-21-2007 01:36 PM

helo...still no solution yet ????

Zia 02-22-2007 01:31 AM

any one alive here ?

lendy 02-26-2007 03:31 AM

hi,
sorry,i have 8 day's holiday.
i use it good in xcache,check php.ini
set xcache.var_size not 0,same as xcache.size
then var will work,not work in default.

you can see attachs

Zia 02-26-2007 04:00 AM

hmm

my xcache.size is
xcache.size = 64M

and var size
xcache.var_size = 0M

hence vb dont work with varcache..so engage 64MB of ram is kinda meaningless..

is there any way? to do it

edit: ur var cache is working?

Zia 02-26-2007 04:07 AM

http://img405.imageshack.us/img405/3767/sckk4.jpg

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?

lendy 02-26-2007 04:09 AM

xcache.var_size = 64M

few day ago,you see
https://vborg.vbsupport.ru/attachmen...3&d=1172467912

then change to use
xcache.size
xcache.var_size

enough memory for xcache ,not waste.

lendy 02-26-2007 04:14 AM

see list var data as
https://vborg.vbsupport.ru/attachmen...4&d=1172467912

Zia 02-26-2007 04:32 AM

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?

lendy 02-26-2007 04:55 AM

Quote:

Originally Posted by Zia (Post 1190894)
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.

goyo 02-26-2007 09:07 AM

Great work lendy! :up:

Works as described with xcache.

Zia 02-26-2007 02:42 PM

Quote:

Originally Posted by goyo (Post 1190965)
Great work lendy! :up:

Works as described with xcache.

do u mind post ur screen shot of Xcache status?

lendy 02-27-2007 12:08 AM

Attachment 61099
Variable Cache is disabled.

if set Variable Cache value
this value same as Opcode Cache.
Attachment 61100

Zia 02-27-2007 04:11 PM

Quote:

Originally Posted by lendy (Post 1191543)
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

Zia 03-03-2007 06:33 AM

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.


All times are GMT. The time now is 11:38 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.01884 seconds
  • Memory Usage 1,843KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete