update caching on homepage, and add db checks to healthcheck

This commit is contained in:
badblocks 2025-04-29 12:17:23 -07:00
parent 411c274e56
commit 7d94dc001f
4 changed files with 75 additions and 18 deletions

View file

@ -148,6 +148,7 @@ TEMPLATES = [
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
"common.context_processors.cache_settings",
],
},
},
@ -294,6 +295,8 @@ SOCIALACCOUNT_EMAIL_AUTHENTICATION = False
SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = False
SOCIALACCOUNT_ONLY = False
CACHE_TIMEOUT = 604800 # 1 week
if DEBUG:
CACHES = {
"default": {
@ -305,5 +308,6 @@ else:
"default": {
"BACKEND": "django.core.cache.backends.db.DatabaseCache",
"LOCATION": "django_cache",
"TIMEOUT": 604800, # 1 week
}
}