expose memory cache in public api

This commit is contained in:
Robin Appelman 2014-01-06 12:55:56 +01:00
parent 0e843b9d7d
commit 1df1b55b66

View file

@ -136,6 +136,10 @@ class Server extends SimpleContainer implements IServerContainer {
$this->registerService('UserCache', function($c) {
return new UserCache();
});
$this->registerService('MemCache', function ($c) {
$factory = new \OC\Memcache\Factory();
return $factory->create();
});
$this->registerService('ActivityManager', function($c) {
return new ActivityManager();
});
@ -295,6 +299,15 @@ class Server extends SimpleContainer implements IServerContainer {
return $this->query('UserCache');
}
/**
* Returns an ICache instance
*
* @return \OCP\ICache
*/
function getMemCache() {
return $this->query('MemCache');
}
/**
* Returns the current session
*