From 72cf436e5097fc870c5d98660e826201fc7a35ba Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 11 May 2024 00:56:30 -0400 Subject: [PATCH] Set up database cache for django-q2 monitoring --- cmsmanage/settings.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmsmanage/settings.py b/cmsmanage/settings.py index 90026df..b3b77fa 100644 --- a/cmsmanage/settings.py +++ b/cmsmanage/settings.py @@ -85,6 +85,16 @@ class Base(Configuration): }, ] + CACHES = { + "default": { + "BACKEND": "django.core.cache.backends.locmem.LocMemCache", + }, + "database": { + "BACKEND": "django.core.cache.backends.db.DatabaseCache", + "LOCATION": "django_cache", + }, + } + DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" WSGI_APPLICATION = "cmsmanage.wsgi.application" @@ -157,6 +167,7 @@ class Base(Configuration): "error_reporter": {"admin_email": {}}, "ack_failures": True, "max_attempts": 1, + "cache": "database", "ALT_CLUSTERS": { "internal": { "retry": 60 * 60,