MCPcopy Create free account
hub / github.com/psf/cachecontrol / apply

Method apply

cachecontrol/heuristics.py:48–57  ·  view source on GitHub ↗
(self, response: HTTPResponse)

Source from the content-addressed store, hash-verified

46 return {}
47
48 def apply(self, response: HTTPResponse) -> HTTPResponse:
49 updated_headers = self.update_headers(response)
50
51 if updated_headers:
52 response.headers.update(updated_headers)
53 warning_header_value = self.warning(response)
54 if warning_header_value is not None:
55 response.headers.update({"Warning": warning_header_value})
56
57 return response
58
59
60class OneDayCache(BaseHeuristic):

Callers 1

build_responseMethod · 0.80

Calls 2

update_headersMethod · 0.95
warningMethod · 0.95

Tested by

no test coverage detected