Reuse the terms cache group for taxonomy cache invalidation.

See #22526, #14485, [27101], [27102].



git-svn-id: https://develop.svn.wordpress.org/trunk@27142 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-02-09 17:41:07 +00:00
parent eb43703bba
commit e966a23683
2 changed files with 13 additions and 9 deletions
+3 -2
View File
@@ -34,9 +34,10 @@ class Tests_Term_Cache extends WP_UnitTestCase {
*/
function test_get_taxonomy_last_changed() {
$last_changed = get_taxonomy_last_changed( 'category' );
$last_changed_cache = wp_cache_get( 'last_changed', 'category' );
$key = 'category_last_changed';
$last_changed_cache = wp_cache_get( $key, 'terms' );
$this->assertEquals( $last_changed, $last_changed_cache );
wp_cache_delete( 'last_changed', 'category' );
wp_cache_delete( $key, 'terms' );
$this->assertEquals( $last_changed, $last_changed_cache );
$last_changed = get_taxonomy_last_changed( 'category' );
$this->assertNotEquals( $last_changed, $last_changed_cache );