Reintroduce user cache
This was required by avatars and was broken with https://github.com/owncloud/core/pull/16200 Fixes https://github.com/owncloud/core/issues/16942
This commit is contained in:
parent
4bc35286ff
commit
15ba2a4100
|
@ -90,6 +90,7 @@ class Avatar implements \OCP\IAvatar {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function set ($data) {
|
public function set ($data) {
|
||||||
|
|
||||||
if($data instanceOf \OCP\IImage) {
|
if($data instanceOf \OCP\IImage) {
|
||||||
$img = $data;
|
$img = $data;
|
||||||
$data = $img->data();
|
$data = $img->data();
|
||||||
|
|
|
@ -218,8 +218,8 @@ class Server extends SimpleContainer implements IServerContainer {
|
||||||
$this->registerService('AppHelper', function ($c) {
|
$this->registerService('AppHelper', function ($c) {
|
||||||
return new \OC\AppHelper();
|
return new \OC\AppHelper();
|
||||||
});
|
});
|
||||||
$this->registerService('NullCache', function ($c) {
|
$this->registerService('UserCache', function ($c) {
|
||||||
return new NullCache();
|
return new Cache\File();
|
||||||
});
|
});
|
||||||
$this->registerService('MemCacheFactory', function (Server $c) {
|
$this->registerService('MemCacheFactory', function (Server $c) {
|
||||||
$config = $c->getConfig();
|
$config = $c->getConfig();
|
||||||
|
@ -667,7 +667,7 @@ class Server extends SimpleContainer implements IServerContainer {
|
||||||
* @deprecated 8.1.0 use getMemCacheFactory to obtain a proper cache
|
* @deprecated 8.1.0 use getMemCacheFactory to obtain a proper cache
|
||||||
*/
|
*/
|
||||||
public function getCache() {
|
public function getCache() {
|
||||||
return $this->query('NullCache');
|
return $this->query('UserCache');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue