Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/middleware/cache.py
View
2  django/middleware/cache.py
@@ -52,7 +52,7 @@ def process_request(self, request):
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':

0 comments on commit ed2f241

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