Cache API: Make the placement of wp_cache_flush_group() more consistent.

Includes:
* Placing `WP_Object_Cache::flush_group()` next to `::flush()`.
* Placing `wp_cache_supports_group_flush()` next to `wp_cache_flush_group()`.
* Placing the `wp_cache_flush_group()` unit test next to the `::flush()` method test.
* Removing test name from assertion messages, as it is already mentioned directly above in case of failure.
* Adjusting function descriptions per the documentation standards.

Follow-up to [52706], [53763].

See #55647, #4476.

git-svn-id: https://develop.svn.wordpress.org/trunk@53767 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-07-23 14:56:51 +00:00
parent f0ddd2e2c2
commit c937a1a305
6 changed files with 76 additions and 76 deletions

View File

@@ -284,6 +284,17 @@ function wp_cache_flush( $delay = 0 ) {
return $wp_object_cache->flush( $delay );
}
/**
* Whether the object cache implementation supports flushing individual cache groups.
*
* @since 6.1.0
*
* @return bool True if group flushing is supported, false otherwise.
*/
function wp_cache_supports_group_flush() {
return false;
}
/**
* Retrieves object from cache.
*
@@ -745,17 +756,6 @@ function wp_cache_init() {
$wp_object_cache = new WP_Object_Cache();
}
/**
* Whether the object cache implementation supports flushing individual cache groups.
*
* @since 6.1.0
*
* @return bool True if group flushing is supported, false otherwise.
*/
function wp_cache_supports_group_flush() {
return false;
}
/**
* Adds a group or set of groups to the list of non-persistent groups.
*