# HG changeset patch # User Brian Neal # Date 1322612511 0 # Node ID c1f3658830e0877d20f7d097f1e6091fc6e339ba # Parent 7236f526e4146ed0a2e728f5af72baaaf866d817 Add middleware to support site-wide caching for anonymous users. diff -r 7236f526e414 -r c1f3658830e0 mysite/settings/production.py --- 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