mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-22 16:16:39 +00:00
Adds redis cache backend
This commit is contained in:
parent
b91649478b
commit
629140cad4
2 changed files with 15 additions and 0 deletions
|
@ -119,6 +119,20 @@ STREAMS = [
|
|||
{"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
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ django-rename-app==0.1.2
|
|||
pytz>=2021.1
|
||||
boto3==1.17.88
|
||||
django-storages==1.11.1
|
||||
django-redis==5.2.0
|
||||
|
||||
# Dev
|
||||
black==21.4b0
|
||||
|
|
Loading…
Reference in a new issue