[wp-trac] [WordPress Trac] #21760: get_term_by() calls are not cached

WordPress Trac noreply at wordpress.org
Mon Mar 13 13:28:23 UTC 2017


#21760: get_term_by() calls are not cached
--------------------------------------+--------------------------
 Reporter:  wonderboymusic            |       Owner:  ocean90
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  4.8
Component:  Taxonomy                  |     Version:  2.3
 Severity:  major                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------
Changes (by sstoqnov):

 * keywords:  needs-unit-tests needs-patch => has-patch has-unit-tests


Comment:

 @boonebgorges Thank you for your comment!
 The example case is very specific, but I agree that it's possible.

 I've uploaded a new patch including unit tests.
 Note that I've changed the `WP_Term_Query`too, because `get_terms` didn't
 work when I tried to fetch the terms using `'0'` string for slug.

 Feedback is much welcomed :)

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


More information about the wp-trac mailing list