changeset 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 7236f526e414
children 1ff89e01b4ff
files mysite/settings/production.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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