1
0
mirror of https://github.com/django/django.git synced 2024-12-25 10:35:48 +00:00

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
This commit is contained in:
Adrian Holovaty 2005-10-19 13:44:55 +00:00
parent d8632868f9
commit ed2f2419a1

View File

@ -52,7 +52,7 @@ class CacheMiddleware:
def process_response(self, request, response): def process_response(self, request, response):
"Sets the cache, if needed." "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. # We don't need to update the cache, just return.
return response return response
if not request.META['REQUEST_METHOD'] == 'GET': if not request.META['REQUEST_METHOD'] == 'GET':