From: Robin Appelman Date: Thu, 8 Aug 2024 15:24:12 +0000 (+0200) Subject: fix: don't make ICacheFactory depend on database X-Git-Tag: v30.0.0rc3~21^2~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b1744e70a5396d184125a3f0d743260047f971de;p=nextcloud-server.git fix: don't make ICacheFactory depend on database Signed-off-by: Robin Appelman --- diff --git a/lib/private/Server.php b/lib/private/Server.php index a0072b43ee2..cf0d6a72bce 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -643,11 +643,11 @@ class Server extends ServerContainer implements IServerContainer { ArrayCache::class, ArrayCache::class ); - /** @var \OCP\IConfig $config */ - $config = $c->get(\OCP\IConfig::class); + /** @var SystemConfig $config */ + $config = $c->get(SystemConfig::class); - if ($config->getSystemValueBool('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { - if (!$config->getSystemValueBool('log_query')) { + if ($config->getValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { + if (!$config->getValue('log_query')) { try { $v = \OC_App::getAppVersions(); } catch (\Doctrine\DBAL\Exception $e) { @@ -671,10 +671,10 @@ class Server extends ServerContainer implements IServerContainer { return new \OC\Memcache\Factory($prefix, $c->get(LoggerInterface::class), $profiler, - $config->getSystemValue('memcache.local', null), - $config->getSystemValue('memcache.distributed', null), - $config->getSystemValue('memcache.locking', null), - $config->getSystemValueString('redis_log_file') + $config->getValue('memcache.local', null), + $config->getValue('memcache.distributed', null), + $config->getValue('memcache.locking', null), + $config->getValue('redis_log_file') ); } return $arrayCacheFactory;