40 def send(self, request, cacheable_methods=None, **kw):
42 Send a request. Use the request information to see if it
43 exists in the cache and cache the response if we need to and can.
48 cached_response = self.
controller.cached_request(request)
50 cached_response =
None
57 resp =
super(CacheControlAdapter, self).
send(request, **kw)
62 self, request, response, from_cache=False, cacheable_methods=None
65 Build a response by making a request or using the cache.
67 This will end up calling send and returning a potentially
83 cached_response = self.
controller.update_cached_response(
87 if cached_response
is not response:
97 response = cached_response
101 self.
controller.cache_response(request, response)
108 self.
controller.cache_response, request, response
114 def _update_chunk_length(self):
120 _update_chunk_length, response
128 self.
cache.delete(cache_url)