From bee00fcac988882543128500c103a2b34c5c86e0 Mon Sep 17 00:00:00 2001 From: Joel Natividad Date: Mon, 30 Dec 2013 15:58:24 -0500 Subject: [PATCH] changed memcached server parsing to allow for local unix domain socket connections * This works with local memcached (e.g. unix:///var/run/memcached/memcached.sock:0 ) and noticeably increases memcached mediawiki performance Change-Id: Ie08c151caa09eb0a4269df88965d71c2367c398b --- includes/objectcache/MemcachedClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/objectcache/MemcachedClient.php b/includes/objectcache/MemcachedClient.php index f0a9128904..79c51872c4 100644 --- a/includes/objectcache/MemcachedClient.php +++ b/includes/objectcache/MemcachedClient.php @@ -729,7 +729,7 @@ class MWMemcached { * @access private */ function _connect_sock( &$sock, $host ) { - list( $ip, $port ) = explode( ':', $host ); + list( $ip, $port ) = preg_split('/:(?=\d)/' , $host ); $sock = false; $timeout = $this->_connect_timeout; $errno = $errstr = null; -- 2.20.1