'Build a response by making a request or using the cache.
This will end up calling send and returning a potentially
cached response'

def build_response(self, request, response, from_cache=False):

    if ((not from_cache) and (request.method == 'GET')):
        if (response.status == 304):
            cached_response = self.controller.update_cached_response(request, response)
            if (cached_response is not response):
                from_cache = True
            response.read(decode_content=False)
            response.release_conn()
            response = cached_response
        elif (response.status == 301):
            self.controller.cache_response(request, response)
        else:
            if self.heuristic:
                response = self.heuristic.apply(response)
            response._fp = CallbackFileWrapper(response._fp, functools.partial(self.controller.cache_response, request, response))
    resp = super(CacheControlAdapter, self).build_response(request, response)
    if ((request.method in self.invalidating_methods) and resp.ok):
        cache_url = self.controller.cache_url(request.url)
        self.cache.delete(cache_url)
    resp.from_cache = from_cache
    return resp
