From ed2f2419a1a49e1cc3e1279ae922babafcd0395a Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 19 Oct 2005 13:44:55 +0000 Subject: [PATCH] Fixed #647 -- Fixed cache middleware not to expect _cache_update_cache, in case of 404s and 500s. Thanks, Eugene git-svn-id: http://code.djangoproject.com/svn/django/trunk@954 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/middleware/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/middleware/cache.py b/django/middleware/cache.py index 04f98122f7..bb3396c849 100644 --- a/django/middleware/cache.py +++ b/django/middleware/cache.py @@ -52,7 +52,7 @@ class CacheMiddleware: def process_response(self, request, response): "Sets the cache, if needed." - if not request._cache_update_cache: + if not hasattr(request, '_cache_update_cache') or not request._cache_update_cache: # We don't need to update the cache, just return. return response if not request.META['REQUEST_METHOD'] == 'GET':