[wp-trac] [WordPress Trac] #32044: is_object_in_term() leaks DB queries
WordPress Trac
noreply at wordpress.org
Mon Apr 27 15:00:47 UTC 2015
#32044: is_object_in_term() leaks DB queries
------------------------------------------+--------------------
Reporter: joehoyle | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.3
Component: Taxonomy | Version: 4.1.1
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+--------------------
Comment (by joehoyle):
Ah, sorry missed that we needed the type to call
`update_object_term_cache`. However, I don't see why we can't do
`wp_cache_add($object_id, $terms, $taxonomy . '_relationships');` it's
going to read that exact cache key via `is_object_in_term`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32044#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list