WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#37419 closed defect (bug) (fixed)

Add cache domain to comments query

Reported by: Chouby Owned by: SergeyBiryukov
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.6
Component: Comments Keywords: has-patch commit
Focuses: Cc:

Description

[37613] made the comment cache persistent. This is likely to break plugins using the 'comments_clauses' filter, as only known query arguments are used in the cache key.

The cache domain used for terms query is very convenient to handle similar situation for terms.

I propose to add a cache domain to to comments query too.

Attachments (2)

37419.patch (982 bytes) - added by Chouby 4 years ago.
37419.2.patch (1.3 KB) - added by rachelbaker 4 years ago.
Includes @since inline doc for new $cache_domain param

Download all attachments as: .zip

Change History (7)

@Chouby
4 years ago

#1 @Chouby
4 years ago

  • Keywords has-patch added

#2 @ocean90
4 years ago

Related: #13318 / [18128] for get_terms()

@rachelbaker
4 years ago

Includes @since inline doc for new $cache_domain param

#3 @rachelbaker
4 years ago

  • Milestone changed from Awaiting Review to 4.6

Previous patch looked good, I only added missing @since notation for the new parameter. @boonebgorges Anything else needed here?

#4 @rachelbaker
4 years ago

  • Keywords commit added

#5 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 38117:

Comments: Introduce the cache_domain argument for WP_Comment_Query to allow caching to a unique set of cache buckets.

See [18128] for get_terms() and [37572] for WP_Term_Query.

Props Chouby, rachelbaker.
Fixes #37419.

Note: See TracTickets for help on using tickets.