diff mysite/settings/production.py @ 37:c1f3658830e0

Add middleware to support site-wide caching for anonymous users.
author Brian Neal <bgneal@gmail.com>
date Wed, 30 Nov 2011 00:21:51 +0000
parents 21172e9be136
children
line wrap: on
line diff
--- a/mysite/settings/production.py	Wed Nov 30 00:16:44 2011 +0000
+++ b/mysite/settings/production.py	Wed Nov 30 00:21:51 2011 +0000
@@ -34,6 +34,9 @@
 CACHE_MIDDLEWARE_SECONDS = 600
 CACHE_MIDDLEWARE_KEY_PREFIX = ''
 
+MIDDLEWARE_CLASSES.insert(0, 'django.middleware.cache.UpdateCacheMiddleware')
+MIDDLEWARE_CLASSES.append('django.middleware.cache.FetchFromCacheMiddleware')
+
 EMAIL_HOST = 'localhost'
 EMAIL_PORT = 25