#13 tweak caching settings

This commit is contained in:
willipink 2020-12-19 10:33:13 +00:00
parent d0ed605f70
commit 2de655a8df
2 changed files with 8 additions and 1 deletions

View File

@ -47,6 +47,7 @@ MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.http.ConditionalGetMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
@ -142,4 +143,4 @@ CACHES = {
# caching
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_SECONDS = 600
CACHE_MIDDLEWARE_SECONDS = 60*60*24*7

View File

@ -44,7 +44,9 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
@ -126,3 +128,7 @@ MAINTENANCE_MODE_READ_ONLY = False
# do not redirect after login
LOGIN_REDIRECT_URL = './'
# caching
CACHE_MIDDLEWARE_ALIAS = willipink_coinc
CACHE_MIDDLEWARE_SECONDS = 600