From db558726fd18534614f6f9dd42a24ab154ce741a Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Mon, 6 Jan 2020 04:46:49 -0800 Subject: [PATCH 1/2] Update README for v0.8.0 --- README.md | 4 ++-- readme.txt | 4 ++-- wp-redis.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e1669a7..e7e495e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** cache, plugin, redis **Requires at least:** 3.0.1 **Tested up to:** 5.3 -**Stable tag:** 0.7.1 +**Stable tag:** 0.8.0 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -107,7 +107,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a ## Changelog ## -### 0.8.0 (Unreleased) ### +### 0.8.0 (January 6, 2020) ### * Uses `flushdb` instead of `flushAll` to avoid flushing the entire Redis instance [[#259](https://github.com/pantheon-systems/wp-redis/pull/259)]. ### 0.7.1 (December 14, 2018) ### diff --git a/readme.txt b/readme.txt index f2afe6d..765dfc9 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: getpantheon, danielbachhuber, mboynes, Outlandish Josh Tags: cache, plugin, redis Requires at least: 3.0.1 Tested up to: 5.3 -Stable tag: 0.7.1 +Stable tag: 0.8.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -107,7 +107,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a == Changelog == -= 0.8.0 (Unreleased) = += 0.8.0 (January 6, 2020) = * Uses `flushdb` instead of `flushAll` to avoid flushing the entire Redis instance [[#259](https://github.com/pantheon-systems/wp-redis/pull/259)]. = 0.7.1 (December 14, 2018) = diff --git a/wp-redis.php b/wp-redis.php index f019ce6..ceb012b 100644 --- a/wp-redis.php +++ b/wp-redis.php @@ -3,7 +3,7 @@ * Plugin Name: WP Redis * Plugin URI: http://github.com/pantheon-systems/wp-redis/ * Description: WordPress Object Cache using Redis. Requires the PhpRedis extension (https://github.com/phpredis/phpredis). - * Version: 0.8.0-alpha + * Version: 0.8.0 * Author: Pantheon, Josh Koenig, Matthew Boynes, Daniel Bachhuber, Alley Interactive * Author URI: https://pantheon.io/ */ From 33f7a196ef484055a83fe30c294b966555db929b Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Mon, 6 Jan 2020 04:59:44 -0800 Subject: [PATCH 2/2] Switch another instance of `flushAll` to `flushdb` --- object-cache.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/object-cache.php b/object-cache.php index 59ccf5b..5c12e94 100644 --- a/object-cache.php +++ b/object-cache.php @@ -1221,6 +1221,7 @@ protected function _call_redis( $method ) { case 'hDel': return 1; case 'flushAll': + case 'flushdb': case 'IsConnected': case 'exists': case 'get': @@ -1344,7 +1345,7 @@ public function __construct() { $this->do_redis_failback_flush = (bool) $wpdb->get_results( "SELECT {$col2} FROM {$table} WHERE {$col1}='wp_redis_do_redis_failback_flush'" ); // @codingStandardsIgnoreEnd if ( $this->is_redis_connected && $this->do_redis_failback_flush ) { - $ret = $this->_call_redis( 'flushAll' ); + $ret = $this->_call_redis( 'flushdb' ); if ( $ret ) { // @codingStandardsIgnoreStart $wpdb->query( "DELETE FROM {$table} WHERE {$col1}='wp_redis_do_redis_failback_flush'" );