Skip to content
Commit dceb38dc authored by Scott Taylor's avatar Scott Taylor
Browse files

Regenerate the term hierarchy cache (`{taxonomy}_children`) when it is out of...

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.


Built from https://develop.svn.wordpress.org/trunk@27102


git-svn-id: https://core.svn.wordpress.org/trunk@26971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent a0e2940b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment