Permalink
Browse files

Add unix sockets support to memcache.

  • Loading branch information...
1 parent a61bd5e commit 5e7509be55a0fc0f6727fda469e4b58da1438946 @T0aD T0aD committed with markstory Sep 4, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 cake/libs/cache/memcache.php
View
5 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) {

0 comments on commit 5e7509b

Please sign in to comment.