Skip to content

Commit

Permalink
Respect WP_REDIS_SCHEME for cluster connection
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Sep 6, 2024
1 parent 04176f4 commit a8cf650
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/class-predis.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ public function connect( $read_timeout = null ) {
$servers = $this->build_cluster_connection_array();
$parameters['cluster'] = $servers;
$options['cluster'] = 'redis';
if ( defined('WP_REDIS_SCHEME') ) {
$options['parameters'] = [
'scheme' => WP_REDIS_SCHEME,
];
}
}

if ( strcasecmp( 'unix', $parameters['scheme'] ) === 0 ) {
Expand Down

0 comments on commit a8cf650

Please sign in to comment.