diff options
author | Joas Schilling <coding@schilljs.com> | 2023-08-29 08:04:25 +0200 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2023-09-06 15:13:23 +0200 |
commit | eb3e715ebd32731c879121a12b5eae510b625434 (patch) | |
tree | 3e69e4a7f0065f555ccee672d861abd106962cf6 /lib/private/Server.php | |
parent | f254173a88e5234ffd0efc963782c4a1eb10c0bf (diff) | |
download | nextcloud-server-eb3e715ebd32731c879121a12b5eae510b625434.tar.gz nextcloud-server-eb3e715ebd32731c879121a12b5eae510b625434.zip |
fix(ratelimit): Only use memory cache backend for redis
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index cd2dab27cbf..ba8b18f9a05 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -786,8 +786,8 @@ class Server extends ServerContainer implements IServerContainer { $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), |