]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: don't make ICacheFactory depend on database
authorRobin Appelman <robin@icewind.nl>
Thu, 8 Aug 2024 15:24:12 +0000 (17:24 +0200)
committerLouis <louis@chmn.me>
Wed, 28 Aug 2024 12:54:14 +0000 (14:54 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Server.php

index a0072b43ee20ae10abaac6de225a0065ed7bac5e..cf0d6a72bce6d33db1d446cdf37fab0435c92758 100644 (file)
@@ -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;