Skip to content
Snippets Groups Projects
Commit 1df1b55b authored by Robin Appelman's avatar Robin Appelman
Browse files

expose memory cache in public api

parent 0e843b9d
No related branches found
No related tags found
No related merge requests found
...@@ -136,6 +136,10 @@ class Server extends SimpleContainer implements IServerContainer { ...@@ -136,6 +136,10 @@ class Server extends SimpleContainer implements IServerContainer {
$this->registerService('UserCache', function($c) { $this->registerService('UserCache', function($c) {
return new UserCache(); return new UserCache();
}); });
$this->registerService('MemCache', function ($c) {
$factory = new \OC\Memcache\Factory();
return $factory->create();
});
$this->registerService('ActivityManager', function($c) { $this->registerService('ActivityManager', function($c) {
return new ActivityManager(); return new ActivityManager();
}); });
...@@ -295,6 +299,15 @@ class Server extends SimpleContainer implements IServerContainer { ...@@ -295,6 +299,15 @@ class Server extends SimpleContainer implements IServerContainer {
return $this->query('UserCache'); return $this->query('UserCache');
} }
/**
* Returns an ICache instance
*
* @return \OCP\ICache
*/
function getMemCache() {
return $this->query('MemCache');
}
/** /**
* Returns the current session * Returns the current session
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment