class HTTP::Cache
def get_response(req, options, request_performer)
-
(Response)
- the response to the request, either from the
def get_response(req, options, request_performer) cached_resp = cache_lookup(req) return cached_resp if cached_resp && !cached_resp.stale? # cache miss logger.debug { "Cache miss for <#{req.uri}>, making request" } actual_req = if cached_resp req.conditional_on_changes_to(cached_resp) else req end actual_resp = make_request(actual_req, options, request_performer) handle_response(cached_resp, actual_resp, req) end