Add support for Redis Object Cache by tillkruss · Pull Request #5436 · wp-cli/wp-cli
Expand Up
@@ -248,10 +248,14 @@ function wp_get_cache_type() {
} elseif ( class_exists( 'APC_Object_Cache' ) ) {
$message = 'APC';
// Test for Redis Object Cache (https://github.com/alleyinteractive/wp-redis) // Test for WP Redis (https://wordpress.org/plugins/wp-redis/) } elseif ( isset( $wp_object_cache->redis ) && $wp_object_cache->redis instanceof \Redis ) { $message = 'Redis';
// Test for Redis Object Cache (https://wordpress.org/plugins/redis-cache/) } elseif ( method_exists( $wp_object_cache, 'redis_instance' ) && method_exists( $wp_object_cache, 'redis_status' ) ) { $message = 'Redis';
// Test for WP LCache Object cache (https://github.com/lcache/wp-lcache) } elseif ( isset( $wp_object_cache->lcache ) && $wp_object_cache->lcache instanceof \LCache\Integrated ) { $message = 'WP LCache'; Expand Down
// Test for Redis Object Cache (https://github.com/alleyinteractive/wp-redis) // Test for WP Redis (https://wordpress.org/plugins/wp-redis/) } elseif ( isset( $wp_object_cache->redis ) && $wp_object_cache->redis instanceof \Redis ) { $message = 'Redis';
// Test for Redis Object Cache (https://wordpress.org/plugins/redis-cache/) } elseif ( method_exists( $wp_object_cache, 'redis_instance' ) && method_exists( $wp_object_cache, 'redis_status' ) ) { $message = 'Redis';
// Test for WP LCache Object cache (https://github.com/lcache/wp-lcache) } elseif ( isset( $wp_object_cache->lcache ) && $wp_object_cache->lcache instanceof \LCache\Integrated ) { $message = 'WP LCache'; Expand Down