[wp-trac] [WordPress Trac] #35381: Introduce `WP_Term_Query`
WordPress Trac
noreply at wordpress.org
Thu May 26 12:49:44 UTC 2016
#35381: Introduce `WP_Term_Query`
--------------------------------------------------+------------------
Reporter: boonebgorges | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.6
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing dev-feedback | Focuses:
--------------------------------------------------+------------------
Comment (by boonebgorges):
> 35381.3.patch adds improved caching.
See https://core.trac.wordpress.org/ticket/35381#comment:13. There are
historical reasons why this cache has an expiration. A new ticket would be
an appropriate place to discuss whether and how this can be changed. As
for the caching of term IDs only, this patch is going to break the current
caching strategy because we expect term objects when `wp_cache_get()`
earlier in the method. In any case, that discussion would be better suited
for #34239, which is about splitting the SQL query, but would bear
directly on the question of what gets cached.
> think you forgot to add the $term_query variable to the filter in
37572. :)
> One other thing I'm curious about is why you changed the filter
arguments to use $args and $taxonomies instead of relying on the query
vars from WP_Term_Query like you did in 35381.2.diff. Or is that only
because you missed that line? I thought the way in the patch was better
because that way $args was filled with its defaults.
I had to massage the patch to get it to reapply after some recent
documentation changes in trunk. I must have missed this. I will fix it
later.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35381#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list