Skip to content

Commit 80aa8e1

Browse files
Warn when wp transient list is used with external object cache (#82)
1 parent 8dd5a11 commit 80aa8e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Transient_Command.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ public function type() {
296296
public function list_( $args, $assoc_args ) {
297297
global $wpdb;
298298

299+
if ( wp_using_ext_object_cache() ) {
300+
WP_CLI::warning( 'Transients are stored in an external object cache, and this command only shows those stored in the database.' );
301+
}
302+
299303
$network = Utils\get_flag_value( $assoc_args, 'network', false );
300304
$unserialize = Utils\get_flag_value( $assoc_args, 'unserialize', false );
301305
$human_readable = Utils\get_flag_value( $assoc_args, 'human-readable', false );

0 commit comments

Comments
 (0)