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/base.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/base.php')
-rw-r--r-- | lib/base.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index 84616090ec8..e957d6be089 100644 --- a/lib/base.php +++ b/lib/base.php @@ -726,8 +726,8 @@ class OC { $instanceId = \OC::$server->getSystemConfig()->getValue('instanceid', null); if ($instanceId) { try { - $memcacheFactory = new \OC\Memcache\Factory($instanceId); - self::$loader->setMemoryCache($memcacheFactory->createLowLatency('Autoloader')); + $memcacheFactory = \OC::$server->getMemCacheFactory(); + self::$loader->setMemoryCache($memcacheFactory->createLocal('Autoloader')); } catch (\Exception $ex) { } } |