This commit is contained in:
2025-03-10 17:41:39 +08:00
parent 82d65af4a9
commit 60932c57f9
2 changed files with 11 additions and 1 deletions

View File

@@ -105,10 +105,19 @@ PROD_DATABASES = {
},
}
PROD_CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.db.DatabaseCache",
"LOCATION": "webpreview_api_cache",
}
}
if DEBUG:
DATABASES = DEV_DATABASES
else:
DATABASES = PROD_DATABASES
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
CACHES = PROD_CACHES
# Password validation
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators