From 9e0f22777535e652fb7c1ac372a32973b518415b Mon Sep 17 00:00:00 2001 From: EarthlingDavey <15802017+EarthlingDavey@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:27:00 +0000 Subject: [PATCH] Fix syntax (#778) --- public/app/object-cache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/object-cache.php b/public/app/object-cache.php index aae75dc32..2a992b4e5 100644 --- a/public/app/object-cache.php +++ b/public/app/object-cache.php @@ -28,7 +28,7 @@ // ^ When using Relay, we need to prefix a scheme to `$_SERVER['CACHE_HOST']` if ( WP_REDIS_USE_RELAY && !empty($_SERVER['CACHE_HOST']) ) { // Prefix scheme to the host, default to tls. - $_SERVER['CACHE_HOST'] = ($_SERVER['CACHE_SCHEME'] ?: 'tls') . '://' . $_SERVER['CACHE_HOST']; + $_SERVER['CACHE_HOST'] = ($_SERVER['CACHE_SCHEME'] ?? 'tls') . '://' . $_SERVER['CACHE_HOST']; } if ( ! defined( 'WP_CACHE_KEY_SALT' ) ) { @@ -1271,7 +1271,7 @@ public function build_client_parameters( $redis_server ) { $port = 6379; // Default Redis database number. // ^ Prevent a conflict where data from a previous class is still present in the cluster. - $database = WP_REDIS_USE_RELAY ? 0 : 1; + $database = WP_REDIS_USE_RELAY ? 2 : 1; // * // Default timeout in ms. // I multiplied this by 1000 so we'd have a common measure of ms instead of s and ms, need to make sure this gets divided by 1000.