The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Template Cache System Details »» | |||||||||||||||||||||||||
Notice: While filesystem caching does provide a performance increase; it can be futher increased. I plan on including mmcache, eaccelerator, and APC shared memory support in the near future. This will eliminate the need for reading/writing file to and from the filesystem. Summary: This modification will cache the templates that your forum uses to the file system saving you a mysql query. Normally this data is requested from the database on every page load, with this however we cache all the templates we would normally use into a file to be included as a standard php code. This will save you a pretty large query, the full size of the templates can be anywhere from 40kb to 200kb per page; even larger on some forums. It will literally take 1 or 2 minutes to install, not long for the benefits that you receive. PS. Use this in conjunction with my Other Hack (Compress Forum Templates) for speeding up your forum even more by compressing templates. https://vborg.vbsupport.ru/showthread.php?t=107615 PS. Use this in conjunction with my Other Hack (Accelerated Plugins) for speeding up your forum even more by Inlining your plugins. https://vborg.vbsupport.ru/showthread.php?t=107315 Instructions: 1. Download Zip File. 2. Read the INSTALL.txt 3. Click install if you like Updates: 3/14/2006 8:34am : Large update, adding additional file locking code as well as moved some redundant code into functions. If you have an active site I recommend that you update with the newest version. 3/14/2006 7:07am : Cleaned up the code a little bit, no need to redo the edits unless you are a perfectionist like myself 3/13/2006 12:52 / Typo Update: There was a typo in the global.php edit, please re-do that step. 3/13/2006 11:48 / Massive Critical Update: 1. Automatically caches any uncached templates. 2. Files are now stored as .php files to prevent easy viewing. I strongly recommend you update ASAP. Just follow the INSTALL.txt and go through the procedures again. PS. Make sure to empty the template_cache directory after upgrading. Thankyou. 3/12/2006 12:20pm 1. Now caches most action templates 2. The cache cleaner will not delete index.htm or index.html files. 3. Also updated the install.txt 4. Fixed parse error. To upgrade, just re-do the code modifications listed in the install.txt file. PLEASE clear the template_cache directory, after you redo the modifications. The new changes cache the actiontemplates as well. Troubleshooting: Start browsing your forum, going to your main page then browsing threads etc.. should start seeing items appear in that template_cache directory such as index_1.php, showthread_1.php etc.. if not you need to give this directory WRITE permissions (CHMOD 777) Show Your Support
|
Comments |
#92
|
||||
|
||||
I use Hellcat's Realtime Page Compressor... does this work with that?
|
#93
|
|||
|
|||
I have this problem (double vBShout, Members visited today, IRC manager) too...
Any ideas? |
#94
|
||||
|
||||
Quote:
|
#95
|
||||
|
||||
Yes it does i have them all hellcat's and pluging accelerator and pluging cache and compresssors works fine
|
#96
|
||||
|
||||
Nice idea though I see two problems:
1) You could run into an endless loop trying to get a lock 2) Increased memory footprint After some time, you've effectively cached templates for all actions. I played with template caching myself (using APC) some time ago and didn't get any performacne increases - it even seemd to be a bit slower. What are your experiences? |
#97
|
|||
|
|||
I did the same test last year, i got marginal improvements in some scripts and performance loss in others. I was relying on APC etc to cache the file into memory.
|
#98
|
||||
|
||||
i have had no problems using it, infact it does help quite a fair bit on my forum.
|
#99
|
||||
|
||||
Quote:
The memory footprint is increased with subsequent caching, and i Discussed that with a couple of other people while deciding how i should delegate uncached templates; at first I was sorting caches by their GET request ie. private_trackpm_1.php and so forth; the problem with this is that there is no way to tell if the do= is a valid request, and would subsequently create bogus template cache files that were based off of global headers inherent to each inclusion of ./global.php If you have a better idea feel free to say. ps. It is faster on my end using this system; with a better plan and support for SHM via eaccelerator/apc/ etc.. it can be increased. |
#100
|
||||
|
||||
Quote:
Whats the problem exactly. |
#101
|
|||
|
|||
Your best not to store it in eaccelerator manually as you will get overhead for the unserialize calls for a large template array, storing it in files is the best way.
You should be able to use $_templatedo so that you cache the correct set of action templates, though personally I would create a single global cache file with the ones present in global.php and then a script / action specific cache. Regarding uncached templates, why not look through the value of $vbulletin->templatecache at the end of script execution. I have several designs for a potentially better system if you want to investigate. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|