XF 2.1 Is there any caching for Widget like "New threads", "New posts" etc.?

sajal

Active member
Is there any caching available by default for widgets like "New threads", "New posts" etc.? Since, while creating or configuring widgets can't see any caching option...

Thanks in advance.
 
Thanks @Kirby, but don't you think so, with millions of posts these widgets are firing heavy queries on every page if they are displayed in sidebar..
 
@Experts: @Mike @Brogan Would you please have your views on this? If we have millions of posts, and we are displaying say 5-6 widgets like New-Threads, New-Posts etc. on the sidebar.. it's going to fire queries on all the pages, and that may create a lot of heavy queries, your views please?

Due to this, I'm afraid to enabled these widgets on the sidebar, as it may create a "lot of" load on the MySQL.
 
Thanks @Kirby, but don't you think so, with millions of posts these widgets are firing heavy queries on every page if they are displayed in sidebar..
Depends on many factors (How are the widgets configured? How much traffic do you have? How well tuned are your MySQL-Servers?).
Obviously, caching data would reduce load on MySQL, but it might not be too bad.

We're running such widgets on several larger forums (1-7.5 M posts) in the sidebar on almost every page without any issues.
 
Really you should try it to see if it is a significant issue for you. We do have relevant indexes for these queries in most cases.
 
The total amount of posts isn't really an issue; the amount of posts that need to be scanned is the important factor (x traffic).
 
There are various limits on the query so it should be fairly performant. Notably we only return results for "New posts" when the thread has had a reply in the last X days (X defaults to 30). This considerably reduces the amount of rows relevant to the query.
 
I think the last widget "Most Viewed Posts" should be configured carefully.
Don't use those widgets. There are no indexes on reply_count, view_count, first_post_reaction_score by default and the Add-on also does not add them.
(Which, unfortunately seems to be the case for many Add-ons - they are not developed with performance in mind)
 
Ah, @Kirby, many thanks for pointing out that. I'll keep in mind that, couldn't think of what it could do without index with so many posts....!!
 
Top Bottom