Make WordPress Core

Opened 7 months ago

Last modified 5 weeks ago

#57055 assigned enhancement

Allow posts query in wp_dashboard_recent_posts() to be cached

Reported by: ocean90's profile ocean90 Owned by: ocean90's profile ocean90
Milestone: 6.3 Priority: normal
Severity: normal Version: 3.8
Component: Query Keywords: good-first-bug has-patch commit
Focuses: administration, performance Cc:

Description

In wp_dashboard_recent_posts(), cache_results is set to false which means the WP_Query can't benefit of the performance changes in 6.1. I couldn't find a reason why this specific query shouldn't be cached.

The widget was added in [26144] as dashboard_show_published_posts() and renamed to wp_dashboard_recent_posts() in [26690]. cache_results was set in https://github.com/davemart-in/WordPress-3.8-Dashboard/pull/9/files before the merge.

Attachments (1)

57055.diff (533 bytes) - added by benjgrolleau 6 months ago.

Download all attachments as: .zip

Change History (4)

@benjgrolleau
6 months ago

#1 @benjgrolleau
6 months ago

  • Keywords has-patch added; needs-patch removed

Hey @ocean90 ,
Here is the very small patch.

Hope this is well.
Have a good day,
Benj

#2 @spacedmonkey
6 weeks ago

  • Keywords commit added
  • Milestone changed from Future Release to 6.3
  • Version set to 3.8

This patch looks good to commit to me.

#3 @spacedmonkey
5 weeks ago

  • Owner set to ocean90
  • Status changed from new to assigned

Assigning to @ocean90 to commit.

Note: See TracTickets for help on using tickets.