Skip to content

Commit

Permalink
Switch another instance of flushAll to flushdb
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Jan 6, 2020
1 parent db55872 commit 33f7a19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,7 @@ protected function _call_redis( $method ) {
case 'hDel':
return 1;
case 'flushAll':
case 'flushdb':
case 'IsConnected':
case 'exists':
case 'get':
Expand Down Expand Up @@ -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'" );
Expand Down

0 comments on commit 33f7a19

Please sign in to comment.