mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-15 14:20:24 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user