Cache to disk

This commit is contained in:
2024-07-08 21:53:55 +02:00
parent 4976bba39c
commit e0dbfb1c46

View File

@ -171,3 +171,11 @@ MESSAGE_TAGS: dict[int, str] = {
messages.WARNING: "alert-warning", messages.WARNING: "alert-warning",
messages.ERROR: "alert-danger", messages.ERROR: "alert-danger",
} }
CACHE_MIDDLEWARE_SECONDS = 60 * 60 * 24 # 1 day
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.filebased.FileBasedCache",
"LOCATION": DATA_DIR / "django_cache",
},
}