Skip to content

Commit

Permalink
Merge branch 'develop' into feature/plugin-check
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss authored Jan 23, 2025
2 parents e302d9f + b25f391 commit c06eb61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -1151,11 +1151,16 @@ public function fetch_info() {
if ( $this->is_predis() ) {
$connection = $this->redis->getConnection();
if ( $connection instanceof Predis\Connection\Replication\ReplicationInterface ) {
$node = $connection->getCurrent();
$connection->switchToMaster();
}
}

$info = $this->redis->info();

if ( isset( $connection, $node ) ) {
$connection->switchTo($node);
}
}

if ( isset( $info['redis_version'] ) ) {
Expand Down
1 change: 1 addition & 0 deletions redis-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Author: Till Krüss
* Author URI: https://objectcache.pro
* GitHub Plugin URI: https://github.com/rhubarbgroup/redis-cache
* Primary Branch: main
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*
Expand Down

0 comments on commit c06eb61

Please sign in to comment.