vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Board Optimization - Plugin Based Template Cache (https://vborg.vbsupport.ru/showthread.php?t=121876)

amcd 03-18-2007 12:42 PM

Disable the original plugin based template cache. Under your forums, create a new folder called 'cache' and make sure it is writable by the webserver user (www or nobody or similar).

Copy everything in the first code block and put it in a new php file. Save it as yourforums.com/forums/includes/functions_hooks.php

Then, in your adminCP, open 'Add a new plugin'. Under hook location, select 'cache templates'. Under 'Plugin PHP code', put everything from the second code block in orban's post. Make sure 'active' is yes, give it a descriptive name like 'Orban's experimental template cache' and save it.

That's it.

If you ever make any changes to your templates, you have to manually delete forums/cache/*.php otherwise your template changes will not become active.

If this interferes with any other plugin, then there is no remedy as of now. You have to either stop using the other plugin or go back to the old cache.

Zia 03-18-2007 12:51 PM

thnx amcd..

seemd it will create probs (as Orban said). But does it make it any better than the existing one?

amcd 03-18-2007 12:59 PM

It 'may' create problems, not 'will'. It is unsupported. So you can use it if you are confident or daring.

Don't listen to me, because if something bad happens, I may not be competent to help you. It is orban's creation, and if he says it is experimental and not fit for production boards, I guess it is not. But I am using it without any problems from the day he first posted it.

edit: The only reason I am subtly urging you to use it is that I want more people to use it. That will probably put pressure on orban to develop it into a more mature solution. :)

Zia 03-18-2007 04:44 PM

Quote:

Originally Posted by amcd (Post 1206350)
edit: The only reason I am subtly urging you to use it is that I want more people to use it. That will probably put pressure on orban to develop it into a more mature solution. :)

hahaah i believe u read my mind :P
more user more pressure developed version

what r u using as opcode cacher ? how many ram did u allocate for that?

what s ur experience about perfoamance gaining ?

amcd 03-18-2007 05:24 PM

I am using xcache with lighttpd. I have allocated more, but 128 MB should be more than enough if you only have vbulletin.

Regarding performance gains, let us just say that I cannot imagine my forums running without xcache or this plugin. Come to think of it, I cannot imagine my forums running on apache.

btw, if you are really looking for big performance gains and have some php/mysql knowledge, do try sphinx search. The sphinx implementation for vbulletin is also orban's creation, and it is just unbelievable to say the least.

Zia 03-19-2007 12:29 PM

ah i think yet pit forum is not in the shape to impliment sphinx search.yes i read the whole thread for sphinx by orban.Still we are not that large in size....even not in bigboards
just saw ur board...do u mind to say ur server configuration ? dedicated ?

but soon will install the new experimental one...maybe tomorrw night.....
we got 320MB Ram + 1Gb burst ram. 128MB wont be a problem for us.

amcd 03-23-2007 11:22 AM

I am using the experimental version. Since yesterday our users were reporting few problems. The php error logs show a lot of these errors.

Code:

Call to undefined function template_4789() in /usr/home/xb/www/bbb/includes/functions.php(4605) : eval()'d code on line 1
line 4605 of functions.php calls the template called 'option'. I even tried adding a line to the beginning of the plugin, but it did not help. The line I put in was

globaltemplates[] = 'option';

orban 03-23-2007 01:38 PM

Have you recently installed an addon?

You can also try to exclude it, it's somewhere in the function....like I excluded the css templates.

amcd 03-23-2007 01:42 PM

no, I have not installed any add-on.

I have gone back to the original mod for now, and it seems to be working fine.

orban 03-23-2007 05:06 PM

You could try to add "option" to

if (substr($template, 0, 17) == 'editor_jsoptions_' or substr($template, 0, 14) == 'editor_styles_')

or $template == 'option'

Or check what exactly is wrong on that line of code so I can maybe give you a fix...


All times are GMT. The time now is 06:04 PM.

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.01233 seconds
  • Memory Usage 1,741KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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