From: Joel Natividad Date: Mon, 30 Dec 2013 20:58:24 +0000 (-0500) Subject: changed memcached server parsing to allow for local unix domain socket connections X-Git-Tag: 1.31.0-rc.0~17437^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=bee00fcac988882543128500c103a2b34c5c86e0;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;