diff --git a/lib/private/Server.php b/lib/private/Server.php index 9f5313444797c..1aaba2a7ebf83 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -839,8 +839,8 @@ public function __construct($webRoot, \OC\Config $config) { $this->registerDeprecatedAlias('Search', ISearch::class); $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { - $cacheFactory = $c->get(ICacheFactory::class); - if ($cacheFactory->isAvailable()) { + $config = $c->get(\OCP\IConfig::class); + if (ltrim($config->getSystemValueString('memcache.distributed', ''), '\\') === \OC\Memcache\Redis::class) { $backend = new \OC\Security\RateLimiting\Backend\MemoryCacheBackend( $c->get(AllConfig::class), $this->get(ICacheFactory::class),