diff --git a/object-cache.php b/object-cache.php index 05c6526..1093451 100644 --- a/object-cache.php +++ b/object-cache.php @@ -1256,7 +1256,7 @@ public function build_client_parameters( $redis_server ) { } } - if ( file_exists( $redis_server['host'] ) && 'socket' === filetype( $redis_server['host'] ) ) { // unix socket connection. + if (strpos($redis_server['host'], 'unix:///') === 0) { // Unix socket connection. // port must be null or socket won't connect. $port = null; } else { // tcp connection.