Empty the RequestCache if the request ends in an exception

This commit is contained in:
Calen Pennington
2016-06-06 07:21:49 -04:00
parent a88fa5c07a
commit 97136768f9

View File

@@ -51,3 +51,10 @@ class RequestCache(object):
def process_response(self, request, response):
self.clear_request_cache()
return response
def process_exception(self, request, exception): # pylint: disable=unused-argument
"""
Clear the RequestCache after a failed request.
"""
self.clear_request_cache()
return None