Skip to content

Commit

Permalink
fix: don't make ICacheFactory depend on database
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Aug 8, 2024
1 parent c5721a1 commit fe5aa2f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/private/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,11 @@ public function __construct($webRoot, \OC\Config $config) {
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) {
Expand All @@ -671,10 +671,10 @@ public function __construct($webRoot, \OC\Config $config) {
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;
Expand Down

0 comments on commit fe5aa2f

Please sign in to comment.