[wp-trac] [WordPress Trac] #55837: WP_Term_Query cache problem

WordPress Trac noreply at wordpress.org
Tue Jul 5 00:08:03 UTC 2022


#55837: WP_Term_Query cache problem
-------------------------------------------------+-------------------------
 Reporter:  denishua                             |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.0.1
Component:  Taxonomy                             |     Version:  6.0
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests fixed-      |     Focuses:
  major                                          |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

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


Comment:

 In [changeset:"53650" 53650]:
 {{{
 #!CommitTicketReference repository="" revision="53650"
 Taxonomy: Fix caching issues in `WP_Term_Query` class.

 Introduced [52836] when passing `child_of` or `pad_counts` parameters to
 `get_terms` or `WP_Term_Query` class, the array
 of terms received by the query, was not correctly cached. This change
 simplifies the logic in `WP_Term_Query` and
 ensures terms are correctly cached. This change also, improves
 performance, by only caching an array of term ids where
 possible.

 Additionally, the database version bump included in this patch is also
 required for #55890 to initialize the user count
 on single sites.

 Props denishua, spacedmonkey, oztaser, peterwilsoncc, SergeyBiryukov,
 georgestephanis, jnz31, knutsp, mukesh27, costdev,
 tharsheblows.
 Merges [53496] to the 6.0 branch.
 Fixes #55837, #55890.

  --This line, and those below, will be ignored--

 _M   .
 M    src/wp-includes/class-wp-term-query.php
 M    src/wp-includes/version.php
 M    tests/phpunit/tests/term/getTerms.php
 }}}

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


More information about the wp-trac mailing list