From 5e7509be55a0fc0f6727fda469e4b58da1438946 Mon Sep 17 00:00:00 2001 From: T0aD Date: Sun, 4 Sep 2011 04:56:32 +0200 Subject: [PATCH] Add unix sockets support to memcache. --- cake/libs/cache/memcache.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cake/libs/cache/memcache.php b/cake/libs/cache/memcache.php index 3ae5351f740..a861307058d 100644 --- a/cake/libs/cache/memcache.php +++ b/cake/libs/cache/memcache.php @@ -94,12 +94,15 @@ function init($settings = array()) { /** * Parses the server address into the host/port. Handles both IPv6 and IPv4 - * addresses + * addresses and Unix sockets * * @param string $server The server address string. * @return array Array containing host, port */ function _parseServerString($server) { + if ($server[0] == 'u') { + return array($server, 0); + } if (substr($server, 0, 1) == '[') { $position = strpos($server, ']:'); if ($position !== false) {