From e0dbfb1c46ee7564d57174e03bfc12951d8dd9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Mon, 8 Jul 2024 21:53:55 +0200 Subject: [PATCH] Cache to disk --- config/settings.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/settings.py b/config/settings.py index 8206be2..1e85fe1 100644 --- a/config/settings.py +++ b/config/settings.py @@ -171,3 +171,11 @@ MESSAGE_TAGS: dict[int, str] = { messages.WARNING: "alert-warning", 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", + }, +}