XF 1.1 Latest Threads - slow to appear

hawker

Member
I am using the widget framework to run a latest threads / posts section in the sidebar. It works fine, however new posts / threads are slow to update / appear.

It can take up to 2 minutes for a new thread or post to appear in the sidebar. I'm just wondering if there's a way to change this, so they either appear instantly, or at least a bit faster in the side bar.

Thanks all.
 
I can't be sure, but I imagine this is cached which is why it is "slow".

Yep, just checked the following file:

library/WidgetFramework/WidgetRenderer/Threads.php

You could change this line (line 15):

PHP:
'useCache' => true,

To:

PHP:
'useCache' => false,

I haven't tested it, but that should disable any caching.

BUT...

You want to be weary of this. It is cached for a reason - a very good reason. Without the cache, every single time the widget is loaded on a page it will query the database. On a busy forum this could be a massive drain on resources.
 
Top Bottom