I am trying to implement Django's Cache Middleware, and can't seem to get it to work. Here is what I have:
settings.py: MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCacheMiddleware', # this must be first 'ragendja.middleware.ErrorMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', # this must be before CacheMiddleware #'django.middleware.cache.CacheMiddleware', # 'django.middleware.common.CommonMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', # this must be last ) CACHE_MIDDLEWARE_SECONDS = 300 CACHE_MIDDLEWARE_KEY_PREFIX = '' CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True CACHE_BACKEND = 'memcached://?timeout=120' By using apiproxy_stub_map.apiproxy.GetPostCallHooks(), I can see that the memcache is set every time the url is hit. It never 'gets' the memcache. In other words, the cache is set every time, but never called. I never get a cached view, even though it is set into memcache. I have tried this method of site-wide caching, and also used the decorator: from django.views.decorators.cache import cache_control @cache_control(max_age=300) def myview... Pulling my hair out here... Is there something I'm missing? Thank you. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=.
