Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/cache.feature
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ Feature: Managed the WordPress object cache
When I try `wp cache flush`
Then STDERR should not contain:
"""
Warning: Ignoring the --url=<url> argument because flushing the cache affects all sites on a multisite installation.
Warning: Flushing the cache may affect all sites in a multisite installation, depending on the implementation of the object cache.
"""

When I try `wp cache flush --url=example.com`
Then STDERR should contain:
"""
Warning: Ignoring the --url=<url> argument because flushing the cache affects all sites on a multisite installation.
Warning: Flushing the cache may affect all sites in a multisite installation, depending on the implementation of the object cache.
"""

@require-wp-6.1
Expand Down
2 changes: 1 addition & 1 deletion src/Cache_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function delete( $args, $assoc_args ) {
public function flush( $args, $assoc_args ) {

if ( WP_CLI::has_config( 'url' ) && ! empty( WP_CLI::get_config()['url'] ) && is_multisite() ) {
WP_CLI::warning( 'Ignoring the --url=<url> argument because flushing the cache affects all sites on a multisite installation.' );
WP_CLI::warning( 'Flushing the cache may affect all sites in a multisite installation, depending on the implementation of the object cache.' );
}

$value = wp_cache_flush();
Expand Down