[wp-trac] [WordPress Trac] #52710: Taxonomy: Make it possible to bypass automatic caching of results in `get_terms()`

WordPress Trac noreply at wordpress.org
Thu Sep 14 12:38:20 UTC 2023


#52710: Taxonomy: Make it possible to bypass automatic caching of results in
`get_terms()`
-------------------------------------------------+-------------------------
 Reporter:  dlh                                  |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.4
Component:  Taxonomy                             |     Version:  2.3
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  needs-unit-tests has-patch commit    |     Focuses:
  needs-dev-note                                 |  performance
-------------------------------------------------+-------------------------
Changes (by spacedmonkey):

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


Comment:

 In [changeset:"56585" 56585]:
 {{{
 #!CommitTicketReference repository="" revision="56585"
 Taxonomy: Introduce 'cache_results' parameter to WP_Term_Query for
 bypassing query caching.

 Incorporating a new 'cache_results' parameter into the WP_Term_Query
 class, this commit empowers developers with the ability to bypass query
 caches, explicitly triggering database queries when needed.  This brings
 the `WP_Term_Query` class inline with `WP_Query` and `WP_User_Query` that
 already have a 'cache_results' parameter.

 Update the `term_exists` function to use this new parameter, so the term
 query caches are not used while importing.

 Props dlh, spacedmonkey, peterwilsoncc.
 Fixes #52710.
 }}}

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


More information about the wp-trac mailing list