[wp-trac] [WordPress Trac] #25711: The "{$taxonomy}_children" cache can become stale

WordPress Trac noreply at wordpress.org
Sat Oct 26 08:37:52 UTC 2013


#25711: The "{$taxonomy}_children" cache can become stale
--------------------------+-----------------------------
 Reporter:  dd32          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  trunk
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 When you add multiple hierarchical terms on a single page load,
 "{$taxonomy}_children" can become stale as only the first call to
 `clean_term_cache()` will invalidate that cache.

 On subsequent calls, it, along with the `all_ids` and `get` taxonomy
 caches will not be cleared, which leads to anything which relies upon
 hierarchical checks to fail.
 Many things rely upon the hierarchical cache, retrieving children of terms
 being the primary one.

 This can be traced to the `static $cleaned` added in [9102].

 I've attached a basic unit test that covers "{$taxonomy}_children" via
 `_get_term_hierarchy()` in [attachment:25711.diff]

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25711>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list