]> source.dussan.org Git - nextcloud-server.git/commitdiff
chore(app): Do not clear unused cache key 38524/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 30 May 2023 15:48:20 +0000 (17:48 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 30 May 2023 15:48:20 +0000 (17:48 +0200)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/private/App/AppManager.php
tests/lib/App/AppManagerTest.php

index 9b038b7382689f8b07b0357398c37cb0f41bbd6d..b881d37440e9f8ba55804faf5ab488d15e1d06d1 100644 (file)
@@ -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 = [];
        }
 
index 3518ada331436d606908bc51c1603bad8b235ee2..d597b21604111286b1c55c69448a12be8846f15b 100644 (file)
@@ -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)