WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 3 months ago

#41348 closed enhancement (fixed)

Improved caching on WP_Comment_Query

Reported by: spacedmonkey Owned by: boonebgorges
Milestone: 4.9 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

As WP_Site_Query are based on the WP_Comment_Query, changes that are found in #41197 can also be applied to WP_Comment_Query

Attachments (1)

41348.diff (2.8 KB) - added by spacedmonkey 4 months ago.

Download all attachments as: .zip

Change History (4)

@spacedmonkey
4 months ago

#1 @flixos90
4 months ago

  • Owner set to boonebgorges
  • Status changed from new to reviewing

@boonebgorges I committed [41059] recently, which is pretty much the same change for WP_Site_Query, just in case you wanna compare.

#2 @boonebgorges
4 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 41190:

Comments: Ignore the 'fields' parameter in the comment query cache.

WP_Comment_Query always queries runs an ID query, and so is unaffected
by the 'fields' parameter. As such, 'fields' can be ignored when building
a cache key for the results of the ID query.

Props spacedmonkey.
Fixes #41348.

#3 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 4.9
Note: See TracTickets for help on using tickets.