diff options
author | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2015-01-14 18:25:00 +0000 |
---|---|---|
committer | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2015-03-05 11:36:34 +0000 |
commit | 0e4933e6d248ab383e6221e045fec2eaf3d17082 (patch) | |
tree | 5a9f368158b61b276276edaba92d6acb2e922e58 /lib/private/server.php | |
parent | f507601e259da2e6b67237ffcfe8eeda880062ef (diff) | |
download | nextcloud-server-0e4933e6d248ab383e6221e045fec2eaf3d17082.tar.gz nextcloud-server-0e4933e6d248ab383e6221e045fec2eaf3d17082.zip |
Refactor \OC\Memcache\Factory
Caches divided up into two groups: distributed and local. 'Low latency' is an
alias for local caches, while the standard `create()` call tries to get
distributed caches first, then local caches.
Memcache backend is set in `config.php`, with the keys `memcache.local` and
`memcache.distributed`. If not set, `memcache.distributed` defaults to the value
of `memcache.local`.
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index 18d996537e2..896abf04a40 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -155,8 +155,12 @@ class Server extends SimpleContainer implements IServerContainer { return new UserCache(); }); $this->registerService('MemCacheFactory', function ($c) { + $config = $c->getConfig(); $instanceId = \OC_Util::getInstanceId(); - return new \OC\Memcache\Factory($instanceId); + return new \OC\Memcache\Factory($instanceId, + $config->getSystemValue('memcache.local', null), + $config->getSystemValue('memcache.distributed', null) + ); }); $this->registerService('ActivityManager', function ($c) { return new ActivityManager(); |