expose memory cache in public api
This commit is contained in:
parent
0e843b9d7d
commit
1df1b55b66
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue