[wp-trac] [WordPress Trac] #29942: wp_get_object_terms - no caching mechanism in place - results in duplicate queries

WordPress Trac noreply at wordpress.org
Sun Oct 12 17:57:18 UTC 2014


#29942: wp_get_object_terms - no caching mechanism in place - results in duplicate
queries
-------------------------------+-----------------------------
 Reporter:  webgeekconsulting  |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Future Release
Component:  Taxonomy           |     Version:  4.0
 Severity:  normal             |  Resolution:
 Keywords:  needs-unit-tests   |     Focuses:  performance
-------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:   => needs-unit-tests
 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks for the patch! As in #29894, I like the consolidation of cache
 keys. And as in #29894, I have a couple questions and concerns:

 * It looks at a glance like the second query (2332 right hand side in
 https://core.trac.wordpress.org/attachment/ticket/29942/taxonomy.php.patch)
 is pulling up information that is available in the main query being fired
 earlier. No need for a second query, and no need for a separate cache.
 This needs testing.
 * Unit test coverage for `wp_get_object_terms()` is pretty lackluster. I'm
 very wary of making these sorts of changes until we at least get basic
 coverage.

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


More information about the wp-trac mailing list