mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix(ratelimit): Only use memory cache backend for redis
Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
parent
5648713895
commit
0fe4672e43
1 changed files with 2 additions and 2 deletions
|
|
@ -801,8 +801,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…
Reference in a new issue