[wp-trac] [WordPress Trac] #57012: WP_Query caching discards `posts_fields` and `posts_clauses['fields']` filters.

WordPress Trac noreply at wordpress.org
Wed Nov 9 00:26:55 UTC 2022


#57012: WP_Query caching discards `posts_fields` and `posts_clauses['fields']`
filters.
---------------------------------------------+----------------------------
 Reporter:  peterwilsoncc                    |       Owner:  peterwilsoncc
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  6.1.1
Component:  Query                            |     Version:  6.1
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  performance
---------------------------------------------+----------------------------
Changes (by peterwilsoncc):

 * owner:  (none) => peterwilsoncc
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"54768" 54768]:
 {{{
 #!CommitTicketReference repository="" revision="54768"
 Query: Bypass caching for filtered `SELECT`s.

 Bypass caching within `WP_Query` when the `SELECT` clause has been
 modified via a filter. This prevents both cache key collisions and the
 returning of incomplete or unexpected results when the `SELECT` clause has
 been modified by an extender.

 Props pypwalters, claytoncollie, johnwatkins0, TimothyBlynJacobs, costdev,
 spacedmonkey, peterwilsoncc.
 Fixes #57012.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57012#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list