Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37419 closed defect (bug) (fixed)

Add cache domain to comments query

Reported by: chouby's profile Chouby Owned by: sergeybiryukov's profile 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 8 years ago.
37419.2.patch (1.3 KB) - added by rachelbaker 8 years ago.
Includes @since inline doc for new $cache_domain param

Download all attachments as: .zip

Change History (7)

@Chouby
8 years ago

#1 @Chouby
8 years ago

  • Keywords has-patch added

#2 @ocean90
8 years ago

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

@rachelbaker
8 years ago

Includes @since inline doc for new $cache_domain param

#3 @rachelbaker
8 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
8 years ago

  • Keywords commit added

#5 @SergeyBiryukov
8 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.