diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-01-08 15:18:12 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-01-08 15:18:12 +0100 |
commit | be7837402d55abc9a6dc801c943c9b642e821dd0 (patch) | |
tree | 731e0d57501dd3d89243ca0771ae38b276740844 /lib/private/server.php | |
parent | 4d65a8089284e4dde09181b56fb45b86c50d6fb5 (diff) | |
download | nextcloud-server-be7837402d55abc9a6dc801c943c9b642e821dd0.tar.gz nextcloud-server-be7837402d55abc9a6dc801c943c9b642e821dd0.zip |
get the memorycache factory from OCP\Server instead of a cache instance
this allows apps to specify a prefix to use
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index 6b242bddd01..b5fa9148626 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -136,10 +136,9 @@ class Server extends SimpleContainer implements IServerContainer { $this->registerService('UserCache', function($c) { return new UserCache(); }); - $this->registerService('MemCache', function ($c) { + $this->registerService('MemCacheFactory', function ($c) { $instanceId = \OC_Util::getInstanceId(); - $factory = new \OC\Memcache\Factory($instanceId); - return $factory->create(); + return new \OC\Memcache\Factory($instanceId); }); $this->registerService('ActivityManager', function($c) { return new ActivityManager(); @@ -303,10 +302,10 @@ class Server extends SimpleContainer implements IServerContainer { /** * Returns an ICache instance * - * @return \OCP\ICache + * @return \OCP\CacheFactory */ - function getMemCache() { - return $this->query('MemCache'); + function getMemCacheFactory() { + return $this->query('MemCacheFactory'); } /** |