1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Latest Threads - slow to appear

Discussion in 'Troubleshooting and Problems' started by hawker, Sep 23, 2012.

  1. hawker

    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.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    Jake Bunce likes this.
  3. hawker

    hawker Member

    Thanks for this info. Works perfectly.

    At the moment the forum is pretty small, but if it takes off, I'll definitely revisit it.
     
    Chris D likes this.

Share This Page