From 61d66f4643914fc4c6e785fa8d313aa71db2097b Mon Sep 17 00:00:00 2001 From: nutrina Date: Thu, 23 Mar 2023 19:45:29 +0200 Subject: [PATCH] fix(api,cache): specifying redis cache, which will also be used for rate limiting (#177) --- api/scorer/settings/base.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/scorer/settings/base.py b/api/scorer/settings/base.py index 4248a3924..15b1e8c10 100644 --- a/api/scorer/settings/base.py +++ b/api/scorer/settings/base.py @@ -268,3 +268,10 @@ ) MAX_BULK_CACHE_SIZE = 100 + +CACHES = { + "default": { + "BACKEND": "django.core.cache.backends.redis.RedisCache", + "LOCATION": env("CELERY_BROKER_URL", default="redis://localhost:6379/0"), + } +}