Not Solved [How To?] How to cache a template in plugin if not cached by author?
#1
Not Solved
Hi,

I want to fix some of the plugins I have and get fewer queries by caching uncached templates.

What is required to do and manually cache those?
Reply
#2
Not Solved
Try to take a look at hello world plugin approach: inc/plugins/hello.php#L17
Reply
#3
Not Solved
Almost believed this gonna work but it didn't :/

Tried like this at top to cache uncached templates in plugin which is shown on index.
if(defined('THIS_SCRIPT'))
{
    global $templatelist;
    if(isset($templatelist))
    {
        $templatelist .= ',';
    }
	if(THIS_SCRIPT== 'index.php')
	{
		$templatelist .= 'index_sidebar_reputation,index_sidebar_post,index_sidebar';
	}
}
Reply
#4
Not Solved
Try using global_start hook.
Reply
#5
Not Solved
(2019-06-04, 11:14 AM)effone Wrote: Try using global_start hook.

yes, that works!

But why global_modqueue_notice is not cached?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)