comparison 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
comparison
equal deleted inserted replaced
36:7236f526e414 37:c1f3658830e0
31 }, 31 },
32 } 32 }
33 CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True 33 CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
34 CACHE_MIDDLEWARE_SECONDS = 600 34 CACHE_MIDDLEWARE_SECONDS = 600
35 CACHE_MIDDLEWARE_KEY_PREFIX = '' 35 CACHE_MIDDLEWARE_KEY_PREFIX = ''
36
37 MIDDLEWARE_CLASSES.insert(0, 'django.middleware.cache.UpdateCacheMiddleware')
38 MIDDLEWARE_CLASSES.append('django.middleware.cache.FetchFromCacheMiddleware')
36 39
37 EMAIL_HOST = 'localhost' 40 EMAIL_HOST = 'localhost'
38 EMAIL_PORT = 25 41 EMAIL_PORT = 25
39 42
40 LOGGING = { 43 LOGGING = {