Skip to content

Commit

Permalink
Fix syntax (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey authored Nov 7, 2024
1 parent 041d11f commit 9e0f227
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/app/object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) ) {
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 9e0f227

Please sign in to comment.