mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #38524 from nextcloud/chore/app/clear-unused-cache-key
chore(app): Do not clear unused cache key
This commit is contained in:
commit
ffa30ce89b
2 changed files with 0 additions and 12 deletions
|
|
@ -673,8 +673,6 @@ class AppManager implements IAppManager {
|
|||
* Clear the cached list of apps when enabling/disabling an app
|
||||
*/
|
||||
public function clearAppsCache() {
|
||||
$settingsMemCache = $this->memCacheFactory->createDistributed('settings');
|
||||
$settingsMemCache->clear('listApps');
|
||||
$this->appInfos = [];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -133,14 +133,7 @@ class AppManagerTest extends TestCase {
|
|||
);
|
||||
}
|
||||
|
||||
protected function expectClearCache() {
|
||||
$this->cache->expects($this->once())
|
||||
->method('clear')
|
||||
->with('listApps');
|
||||
}
|
||||
|
||||
public function testEnableApp() {
|
||||
$this->expectClearCache();
|
||||
// making sure "files_trashbin" is disabled
|
||||
if ($this->manager->isEnabledForUser('files_trashbin')) {
|
||||
$this->manager->disableApp('files_trashbin');
|
||||
|
|
@ -151,7 +144,6 @@ class AppManagerTest extends TestCase {
|
|||
}
|
||||
|
||||
public function testDisableApp() {
|
||||
$this->expectClearCache();
|
||||
$this->eventDispatcher->expects($this->once())->method('dispatchTyped')->with(new AppDisableEvent('files_trashbin'));
|
||||
$this->manager->disableApp('files_trashbin');
|
||||
$this->assertEquals('no', $this->appConfig->getValue('files_trashbin', 'enabled', 'no'));
|
||||
|
|
@ -180,7 +172,6 @@ class AppManagerTest extends TestCase {
|
|||
->willReturn('group2');
|
||||
|
||||
$groups = [$group1, $group2];
|
||||
$this->expectClearCache();
|
||||
|
||||
/** @var AppManager|MockObject $manager */
|
||||
$manager = $this->getMockBuilder(AppManager::class)
|
||||
|
|
@ -229,7 +220,6 @@ class AppManagerTest extends TestCase {
|
|||
->willReturn('group2');
|
||||
|
||||
$groups = [$group1, $group2];
|
||||
$this->expectClearCache();
|
||||
|
||||
/** @var AppManager|MockObject $manager */
|
||||
$manager = $this->getMockBuilder(AppManager::class)
|
||||
|
|
|
|||
Loading…
Reference in a new issue