updating memcache to make sure server is active

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6377 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-01-13 16:06:19 +00:00
parent 428241bd5e
commit 818fba4005

View file

@ -74,7 +74,6 @@ class MemcacheEngine extends CacheEngine {
}
$this->__Memcache =& new Memcache();
foreach ($this->settings['servers'] as $server) {
$parts = explode(':', $server);
$host = $parts[0];
@ -83,7 +82,9 @@ class MemcacheEngine extends CacheEngine {
$port = $parts[1];
}
if ($this->__Memcache->addServer($host, $port)) {
return true;
if ($this->__Memcache->connect($host, $port)) {
return true;
}
}
}
return false;