Skip to content

Commit

Permalink
Merge pull request #44 from tarosky/issue/43
Browse files Browse the repository at this point in the history
Support Relay
Close #43.
  • Loading branch information
harai authored Nov 24, 2023
2 parents f3c7e88 + 9050733 commit 0247e99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,9 @@ public function key( $key = '', $group = 'default' ) {
* @return Redis Redis client.
*/
public function prepare_client_connection() {
$redis_client = new Redis();
$redis_client = defined( 'WP_CACHE_USE_RELAY' ) && constant( 'WP_CACHE_USE_RELAY' )
? new \Relay\Relay()
: new Redis();

$redis_client->connect(
$this->host, // host
Expand Down

0 comments on commit 0247e99

Please sign in to comment.