def build_response(self, request, response, from_cache=False):
if not from_cache and request.method == '<STR_LIT:GET>':<EOL><INDENT>if response.status == <NUM_LIT>:<EOL><INDENT>cached_response = self.controller.update_cached_response(<EOL>request, response<EOL>)<EOL>if cached_response is not response:<EOL><INDENT>from_cache = True<EOL><DEDENT>response.read(decode_content=False)<EOL>response.release_conn()<EOL>response = cached_response<EOL><DEDENT>else:<EOL><INDENT>if self.heuristic:<EOL><INDENT>response = self.heuristic.apply(response)<EOL><DEDENT>response._fp = CallbackFileWrapper(<EOL>response._fp,<EOL>functools.partial(<EOL>self.controller.cache_response,<EOL>request,<EOL>response,<EOL>)<EOL>)<EOL><DEDENT><DEDENT>resp = super(CacheControlAdapter, self).build_response(<EOL>request, response<EOL>)<EOL>if request.method in self.invalidating_methods and resp.ok:<EOL><INDENT>cache_url = self.controller.cache_url(request.url)<EOL>self.cache.delete(cache_url)<EOL><DEDENT>resp.from_cache = from_cache<EOL>return resp<EOL>
Build a response by making a request or using the cache.

This will end up calling send and returning a potentially
cached response