File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 77 * can use this to guarantee uniqueness for the keys generated by this object cache.
88 */
99
10+ if ( ! defined ( 'WP_REDIS_USE_RELAY ' ) ) {
11+ define ( 'WP_REDIS_USE_RELAY ' , false );
12+ }
13+
14+ // Conditionally run the script if: the correct class exists, and the script has not been disabled.
15+ if ( class_exists ( WP_REDIS_USE_RELAY ? 'Relay\Relay ' : 'Redis ' ) && ( ! defined ( 'WP_REDIS_DISABLED ' ) || ! WP_REDIS_DISABLED ) ):
16+
1017if ( ! defined ( 'WP_CACHE_KEY_SALT ' ) ) {
1118 define ( 'WP_CACHE_KEY_SALT ' , '' );
1219}
@@ -1293,7 +1300,7 @@ public function build_client_parameters( $redis_server ) {
12931300 * @return Redis Redis client.
12941301 */
12951302 public function prepare_client_connection ( $ client_parameters ) {
1296- if ( defined ( ' WP_REDIS_USE_RELAY ' ) && WP_REDIS_USE_RELAY ) {
1303+ if ( WP_REDIS_USE_RELAY ) {
12971304 $ redis = new Relay \Relay ();
12981305 } else {
12991306 $ redis = new Redis ();
You can’t perform that action at this time.
0 commit comments