mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
428241bd5e
commit
818fba4005
1 changed files with 3 additions and 2 deletions
3
cake/libs/cache/memcache.php
vendored
3
cake/libs/cache/memcache.php
vendored
|
@ -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,9 +82,11 @@ class MemcacheEngine extends CacheEngine {
|
|||
$port = $parts[1];
|
||||
}
|
||||
if ($this->__Memcache->addServer($host, $port)) {
|
||||
if ($this->__Memcache->connect($host, $port)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue