def process_request(self, request): """ Stores whether or not FORCE_DJANGO_CACHE_MISS_KEY was supplied in the request. Also, clears the request cache. """ RequestCache.clear() TieredCache._get_and_set_force_cache_miss(request) # pylint: disable=protected-access
def test_clear(self): RequestCache.set(TEST_KEY, EXPECTED_VALUE) RequestCache.clear() cached_response = RequestCache.get_cached_response(TEST_KEY) self.assertTrue(cached_response.is_miss)
def setUp(self): RequestCache.clear()
def process_exception(self, request, exception): # pylint: disable=unused-argument """ Clear the request cache after a failed request. """ RequestCache.clear() return None
def process_response(self, request, response): # pylint: disable=unused-argument """ Clear the request cache after processing a response. """ RequestCache.clear() return response