Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #647 -- Fixed cache middleware not to expect _cache_update_cach…

…e, in case of 404s and 500s. Thanks, Eugene

git-svn-id: http://code.djangoproject.com/svn/django/trunk@954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ed2f2419a1a49e1cc3e1279ae922babafcd0395a 1 parent d863286
Adrian Holovaty authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/middleware/cache.py
2  django/middleware/cache.py
@@ -52,7 +52,7 @@ def process_request(self, request):
52 52
 
53 53
     def process_response(self, request, response):
54 54
         "Sets the cache, if needed."
55  
-        if not request._cache_update_cache:
  55
+        if not hasattr(request, '_cache_update_cache') or not request._cache_update_cache:
56 56
             # We don't need to update the cache, just return.
57 57
             return response
58 58
         if not request.META['REQUEST_METHOD'] == 'GET':

0 notes on commit ed2f241

Please sign in to comment.
Something went wrong with that request. Please try again.