Ajout du cache middleware
authorEric Mc Sween <eric.mcsween@gmail.com>
Tue, 14 Dec 2010 22:18:25 +0000 (17:18 -0500)
committerEric Mc Sween <eric.mcsween@gmail.com>
Tue, 14 Dec 2010 22:18:25 +0000 (17:18 -0500)
auf_savoirs_en_partage/settings.py

index 10293b5..1efb645 100644 (file)
@@ -36,10 +36,12 @@ TEMPLATE_LOADERS = (
 )
 
 MIDDLEWARE_CLASSES = (
+    'django.middleware.cache.UpdateCacheMiddleware',
     'django.middleware.gzip.GZipMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.middleware.cache.FetchFromCacheMiddleware',
     'chercheurs.middleware.ChercheurMiddleware',
     'djangoflash.middleware.FlashMiddleware',
     'pagination.middleware.PaginationMiddleware',
@@ -93,6 +95,7 @@ LOGIN_URL = '/chercheurs/connexion/'
 LOGIN_REDIRECT_URL = '/chercheurs/perso/'
 
 CACHE_BACKEND = 'memcached://localhost:11211'
+CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
 
 ROA_CUSTOM_ARGS = {'api-key': ROA_API_KEY}