[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 18:33:16 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:
  fixed-major                                    |  performance
-------------------------------------------------+-------------------------
Changes (by desrosj):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"54780" 54780]:
 {{{
 #!CommitTicketReference repository="" revision="54780"
 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.
 Merges [54768] to the 6.1 branch.
 Fixes #57012.
 }}}

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


More information about the wp-trac mailing list