Ajout cache

This commit is contained in:
Jean-Marie Favreau 2024-08-18 14:55:39 +02:00
parent 3ba24a6cb6
commit b765b03a20

View File

@ -62,6 +62,9 @@ MIDDLEWARE = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.middleware.cache.UpdateCacheMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.cache.FetchFromCacheMiddleware",
]
CKEDITOR_CONFIGS = {
@ -187,6 +190,17 @@ CELERY_RESULT_BACKEND = REDIS_URL
# SCSS
COMPRESS_PRECOMPILERS = (("text/x-scss", "django_libsass.SassCompiler"),)
# cache
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": REDIS_URL,
"KEY_PREFIX": "agenda",
"TIMEOUT": 60 * 15,
}
}
# EMAIL settings