summaryrefslogtreecommitdiffstats
path: root/lib/private/memcache
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2014-01-10 00:57:40 +0100
committerAndreas Fischer <bantu@owncloud.com>2014-01-10 00:57:40 +0100
commitacd81f6c694373a18a0ee9ba29075b9924603c25 (patch)
treeaf802a4ceac07271278381e2db2b2de1f854cc60 /lib/private/memcache
parent320353c237fbee2d9a8f12dd474feb3a0f6ddec6 (diff)
downloadnextcloud-server-acd81f6c694373a18a0ee9ba29075b9924603c25.tar.gz
nextcloud-server-acd81f6c694373a18a0ee9ba29075b9924603c25.zip
Readd support for memcached_server config variable.
Diffstat (limited to 'lib/private/memcache')
-rw-r--r--lib/private/memcache/memcached.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/memcache/memcached.php b/lib/private/memcache/memcached.php
index 13b1867231a..075828eebad 100644
--- a/lib/private/memcache/memcached.php
+++ b/lib/private/memcache/memcached.php
@@ -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);
}
}