Merge pull request #40308 from nextcloud/backport/stable22/40293

[stable22] fix(ratelimit): Only use memory cache backend for redis
pull/41129/head
Arthur Schiwon 9 months ago committed by GitHub
commit 2d9ba52ccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -796,8 +796,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),

Loading…
Cancel
Save