perf(base): Stop setting up the FS for every basic auth request

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/53920/head
provokateurin 11 months ago committed by nextcloud-command
parent d5c15d4d2f
commit 778c6c0d46
  1. 1
      apps/files_sharing/tests/TestCase.php
  2. 17
      lib/base.php

@ -196,6 +196,7 @@ abstract class TestCase extends \Test\TestCase {
Server::get(IUserSession::class)->setUser(null);
Filesystem::tearDown();
Server::get(IUserSession::class)->login($user, $password);
Filesystem::initMountPoints($user);
\OC::$server->getUserFolder($user);
\OC_Util::setupFS($user);

@ -882,23 +882,6 @@ class OC {
$throttler = Server::get(IThrottler::class);
$throttler->resetDelay($request->getRemoteAddress(), 'login', ['user' => $uid]);
}
try {
$cache = new \OC\Cache\File();
$cache->gc();
} catch (\OC\ServerNotAvailableException $e) {
// not a GC exception, pass it on
throw $e;
} catch (\OC\ForbiddenException $e) {
// filesystem blocked for this request, ignore
} catch (\Exception $e) {
// a GC exception should not prevent users from using OC,
// so log the exception
Server::get(LoggerInterface::class)->warning('Exception when running cache gc.', [
'app' => 'core',
'exception' => $e,
]);
}
});
}
}

Loading…
Cancel
Save