diff --git a/wp-includes/cache-compat.php b/wp-includes/cache-compat.php index c225d91515..367cff05ef 100644 --- a/wp-includes/cache-compat.php +++ b/wp-includes/cache-compat.php @@ -145,8 +145,9 @@ endif; if ( ! function_exists( 'wp_cache_flush_group' ) ) : /** * Removes all cache items in a group, if the object cache implementation supports it. - * Before calling this method, always check for group flushing support using the - * `wp_cache_supports_group_flush()` method. + * + * Before calling this function, always check for group flushing support using the + * `wp_cache_supports_group_flush()` function. * * @since 6.1.0 * @@ -175,7 +176,7 @@ endif; if ( ! function_exists( 'wp_cache_supports_group_flush' ) ) : /** - * Whether the object cache implementation supports flushing individual cache groups. + * Determines whether the object cache implementation supports flushing individual cache groups. * * @since 6.1.0 * diff --git a/wp-includes/cache.php b/wp-includes/cache.php index 9d68b1bb04..dd7038d339 100644 --- a/wp-includes/cache.php +++ b/wp-includes/cache.php @@ -22,19 +22,6 @@ function wp_cache_init() { $GLOBALS['wp_object_cache'] = new WP_Object_Cache(); } -/** - * Whether the object cache implementation supports flushing individual cache groups. - * - * @since 6.1.0 - * - * @see WP_Object_Cache::flush_group() - * - * @return bool True if group flushing is supported, false otherwise. - */ -function wp_cache_supports_group_flush() { - return true; -} - /** * Adds data to the cache, if the cache key doesn't already exist. * @@ -296,8 +283,9 @@ function wp_cache_flush_runtime() { /** * Removes all cache items in a group, if the object cache implementation supports it. - * Before calling this method, always check for group flushing support using the - * `wp_cache_supports_group_flush()` method. + * + * Before calling this function, always check for group flushing support using the + * `wp_cache_supports_group_flush()` function. * * @since 6.1.0 * @@ -313,6 +301,19 @@ function wp_cache_flush_group( $group ) { return $wp_object_cache->flush_group( $group ); } +/** + * Determines whether the object cache implementation supports flushing individual cache groups. + * + * @since 6.1.0 + * + * @see WP_Object_Cache::flush_group() + * + * @return bool True if group flushing is supported, false otherwise. + */ +function wp_cache_supports_group_flush() { + return true; +} + /** * Closes the cache. * diff --git a/wp-includes/class-wp-object-cache.php b/wp-includes/class-wp-object-cache.php index e145bebcf3..b0c1cc36f5 100644 --- a/wp-includes/class-wp-object-cache.php +++ b/wp-includes/class-wp-object-cache.php @@ -290,20 +290,6 @@ class WP_Object_Cache { return $values; } - /** - * Removes all cache items in a group. - * - * @since 6.1.0 - * - * @param string $group Name of group to remove from cache. - * @return true Always returns true. - */ - public function flush_group( $group ) { - unset( $this->cache[ $group ] ); - - return true; - } - /** * Retrieves the cache contents, if it exists. * @@ -509,6 +495,20 @@ class WP_Object_Cache { return true; } + /** + * Removes all cache items in a group. + * + * @since 6.1.0 + * + * @param string $group Name of group to remove from cache. + * @return true Always returns true. + */ + public function flush_group( $group ) { + unset( $this->cache[ $group ] ); + + return true; + } + /** * Sets the list of global cache groups. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 681160085d..c4e2a029de 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53766'; +$wp_version = '6.1-alpha-53767'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.