Adds redis cache backend

This commit is contained in:
Mouse Reeve 2022-01-05 08:27:31 -08:00
parent b91649478b
commit 629140cad4
2 changed files with 15 additions and 0 deletions

View file

@ -119,6 +119,20 @@ STREAMS = [
{"key": "books", "name": _("Books Timeline"), "shortname": _("Books")}, {"key": "books", "name": _("Books Timeline"), "shortname": _("Books")},
] ]
# Redis cache backend
# pylint: disable=line-too-long
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": f"redis://:{REDIS_ACTIVITY_PASSWORD}@{REDIS_ACTIVITY_HOST}:{REDIS_ACTIVITY_PORT}/0",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
}
}
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default"
# Database # Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases # https://docs.djangoproject.com/en/3.2/ref/settings/#databases

View file

@ -17,6 +17,7 @@ django-rename-app==0.1.2
pytz>=2021.1 pytz>=2021.1
boto3==1.17.88 boto3==1.17.88
django-storages==1.11.1 django-storages==1.11.1
django-redis==5.2.0
# Dev # Dev
black==21.4b0 black==21.4b0