Commit 60763642 authored by Evili del Rio's avatar Evili del Rio

Add caching to middleware

Signed-off-by: default avatarEvili del Rio <evili.del.rio@gmail.com>
parent e8e20106
Pipeline #891 passed with stage
in 1 minute and 57 seconds
......@@ -92,6 +92,16 @@ if not('whitenoise.middleware.WhiteNoiseMiddleware' in MIDDLEWARE):
MIDDLEWARE.insert(__sec_index+1, 'whitenoise.middleware.WhiteNoiseMiddleware')
#
# Add caching
#
# UpdateCacheMiddleware goes first
if not('django.middleware.cache.UpdateCacheMiddleware' in MIDDLEWARE):
MIDDLEWARE.add(0, 'django.middleware.cache.UpdateCacheMiddleware')
# FetchFromCacheMiddleware is last
if not('django.middleware.cache.FetchFromCacheMiddleware' in MIDDLEWARE):
MIDDLEWARE.append('django.middleware.cache.FetchFromCacheMiddleware')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment