Empty the RequestCache if the request ends in an exception
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user