[wp-trac] [WordPress Trac] #14485: Taxonomy hierarchy cache isn't properly refreshed
WordPress Trac
noreply at wordpress.org
Thu Feb 6 01:58:02 UTC 2014
#14485: Taxonomy hierarchy cache isn't properly refreshed
-----------------------------------------------+---------------------------
Reporter: thealien | Owner:
Type: defect (bug) | wonderboymusic
Priority: high | Status: closed
Component: Cache API | Milestone: 3.9
Severity: normal | Version: 3.0
Keywords: needs-unit-tests has-patch commit | Resolution: fixed
| Focuses:
-----------------------------------------------+---------------------------
Changes (by wonderboymusic):
* owner: => wonderboymusic
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"27102"]:
{{{
#!CommitTicketReference repository="" revision="27102"
Regenerate the term hierarchy cache (`{taxonomy}_children`) when it is out
of sync with the passed taxonomy's `last_changed` value.
Introduces `taxonomy_hierarchy_is_fresh()`, which is only called in
`_get_term_hierarchy()`. The taxonomy's `last_changed` value is checked
against the value of `wp_cache_get( 'hierarchy_last_changed', $taxonomy
)`.
Adds a unit test - `Tests_Term:test_hierachy_invalidation()`.
See [27101], which makes this type of cache invalidation possible.
Fixes #14485.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14485#comment:77>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list