[wp-trac] [WordPress Trac] #32044: is_object_in_term() leaks DB queries

WordPress Trac noreply at wordpress.org
Sat Oct 3 21:18:57 UTC 2015


#32044: is_object_in_term() leaks DB queries
------------------------------------------+---------------------------
 Reporter:  joehoyle                      |       Owner:  boonebgorges
     Type:  defect (bug)                  |      Status:  closed
 Priority:  normal                        |   Milestone:  4.4
Component:  Taxonomy                      |     Version:  4.1.1
 Severity:  normal                        |  Resolution:  fixed
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+---------------------------
Changes (by boonebgorges):

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


Comment:

 In [changeset:"34812"]:
 {{{
 #!CommitTicketReference repository="" revision="34812"
 Update the taxonomy relationship cache in `is_object_in_term()`.

 This function attempts to read from the relationship cache, and uses any
 data
 it finds. If it finds no data, it does a query for the data it needs.
 Since we
 are going to the trouble to query for the relationships, and since we are
 already using cached data when available, let's go ahead and cache it for
 later use.

 Props joehoyle, boonebgorges.
 Fixes #32044.
 }}}

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


More information about the wp-trac mailing list