diff options
author | Bart Visscher <bartv@thisnet.nl> | 2014-02-10 21:32:17 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2014-02-10 21:32:17 +0100 |
commit | 082abdc62080730f70ac0fac67628e4d3bb0cc7b (patch) | |
tree | 0054fcb95d954b31933aaafbbdcd69d66a6c944e /lib/private/memcache/memcached.php | |
parent | 5c3c379f351be913fe7abd500fadd69a83687ebc (diff) | |
parent | bea80ffe2060407e5d849a86f71fae2eed80b08e (diff) | |
download | nextcloud-server-082abdc62080730f70ac0fac67628e4d3bb0cc7b.tar.gz nextcloud-server-082abdc62080730f70ac0fac67628e4d3bb0cc7b.zip |
Merge branch 'master' into migration_unit_tests
Diffstat (limited to 'lib/private/memcache/memcached.php')
-rw-r--r-- | lib/private/memcache/memcached.php | 12 |
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); } } |