Skip to content

Commit

Permalink
Add unix sockets support to memcache.
Browse files Browse the repository at this point in the history
  • Loading branch information
T0aD authored and markstory committed Sep 7, 2011
1 parent a61bd5e commit 5e7509b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cake/libs/cache/memcache.php
Expand Up @@ -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) {
Expand Down

0 comments on commit 5e7509b

Please sign in to comment.