add cache

This commit is contained in:
2025-03-10 13:48:47 +08:00
parent 0eeab2e7b9
commit 332d685e8b
2 changed files with 9 additions and 0 deletions

View File

@@ -106,10 +106,18 @@ 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
CACHES = PROD_CACHES
# Password validation
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators