Readd support for memcached_server config variable.

This commit is contained in:
Andreas Fischer 2014-01-10 00:57:40 +01:00
parent 320353c237
commit acd81f6c69
1 changed files with 9 additions and 1 deletions

View File

@ -18,7 +18,15 @@ class Memcached extends Cache {
parent::__construct($prefix);
if (is_null(self::$cache)) {
self::$cache = new \Memcached();
$servers = \OC_Config::getValue('memcached_servers', array(array('localhost', 11211)));
$servers = \OC_Config::getValue('memcached_servers');
if (!$servers) {
$server = \OC_Config::getValue('memcached_server');
if ($server) {
$servers = array($server);
} else {
$servers = array(array('localhost', 11211));
}
}
self::$cache->addServers($servers);
}
}