Add cache invalidation when updating a term, example: create a category, assign it to a post, edit the category. Currently, the post's term cache is not updated. When updating terms in a given taxonomy, invalidate the object term caches linked to that taxonomy. 

Introduce `get_taxonomy_last_changed()`, `set_taxonomy_last_changed()`, and `post_taxonomy_is_fresh()`.

`post_taxonomy_is_fresh()` is only called in `get_object_term_cache()` - at which point the taxonomy's `last_changed` value is checked against the post's `{$taxonomy}_last_changed` value.

`set_taxonomy_last_changed()` is called whenever directory database queries are made that insert new terms or affect existing terms.

Fixes #22526.



git-svn-id: http://develop.svn.wordpress.org/trunk@27101 602fd350-edb4-49c9-b593-d223f7449a82
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.



git-svn-id: http://develop.svn.wordpress.org/trunk@27102 602fd350-edb4-49c9-b593-d223f7449a82
Add the unit test from #25711. The patch was unnecessary due to [27102], but the test is useful.

Props dd32.
See #25711.



git-svn-id: http://develop.svn.wordpress.org/trunk@27103 602fd350-edb4-49c9-b593-d223f7449a82
Move some cache related tests to the new `term/cache.php` from [27103].



git-svn-id: http://develop.svn.wordpress.org/trunk@27104 602fd350-edb4-49c9-b593-d223f7449a82
JSHint fixes for media-views and Gruntfile.

props gcorne.
fixes #27032, #27033.


git-svn-id: http://develop.svn.wordpress.org/trunk@27105 602fd350-edb4-49c9-b593-d223f7449a82
Latest from develop.svn.wordpress.org (via upstream)
Add some more paths to .gitignore