summaryrefslogtreecommitdiffstats
path: root/lib/private/memcache
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-02-14 23:03:27 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-02-14 23:03:27 +0100
commit9fac95c2ab46a734607657bbad6f164aaa61286f (patch)
treefc035f83bc812fd4b2f36427bb130ddabf71433e /lib/private/memcache
parentb330d07b51a983dc563a91244a3c83e691c9e97d (diff)
parentdf282d9ef8e040833574fac5c5fd3cbbae1b3209 (diff)
downloadnextcloud-server-9fac95c2ab46a734607657bbad6f164aaa61286f.tar.gz
nextcloud-server-9fac95c2ab46a734607657bbad6f164aaa61286f.zip
Merge branch 'master' into scrutinizer_documentation_patches
Conflicts: lib/private/appconfig.php
Diffstat (limited to 'lib/private/memcache')
-rw-r--r--lib/private/memcache/memcached.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/private/memcache/memcached.php b/lib/private/memcache/memcached.php
index 978e6c2eff1..075828eebad 100644
--- a/lib/private/memcache/memcached.php
+++ b/lib/private/memcache/memcached.php
@@ -18,8 +18,16 @@ class Memcached extends Cache {
parent::__construct($prefix);
if (is_null(self::$cache)) {
self::$cache = new \Memcached();
- list($host, $port) = \OC_Config::getValue('memcached_server', array('localhost', 11211));
- self::$cache->addServer($host, $port);
+ $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);
}
}