Skip to content

Commit

Permalink
Fixed empty WP_CACHE_KEY_SALT handling
Browse files Browse the repository at this point in the history
  • Loading branch information
msigley authored Feb 20, 2020
1 parent 1b203ed commit 7b85660
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ public function __construct( $redis_instance = null ) {
$this->redis = $redis_instance;
$this->redis->connect( $redis['host'], $redis['port'] );
$this->redis->setOption( Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE );
$this->redis->setOption(Redis::OPT_PREFIX, WP_CACHE_KEY_SALT . ':');
if( !empty( WP_CACHE_KEY_SALT ) )
$this->redis->setOption(Redis::OPT_PREFIX, WP_CACHE_KEY_SALT . ':');

if ( isset( $redis['auth'] ) ) {
$this->redis->auth( $redis['auth'] );
Expand Down

0 comments on commit 7b85660

Please sign in to comment.