![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|
Public Member Functions | |
| __init__ (self, BaseCache|None cache=None, bool cache_etags=True, Serializer|None serializer=None, Collection[int]|None status_codes=None) | |
| str | cache_url (cls, str uri) |
| dict[str, int|None] | parse_cache_control (self, Mapping[str, str] headers) |
| HTTPResponse|Literal[False] | cached_request (self, PreparedRequest request) |
| dict[str, str] | conditional_headers (self, PreparedRequest request) |
| None | cache_response (self, PreparedRequest request, HTTPResponse response, bytes|None body=None, Collection[int]|None status_codes=None) |
| HTTPResponse | update_cached_response (self, PreparedRequest request, HTTPResponse response) |
Public Attributes | |
| cache | |
| cache_etags | |
| serializer | |
| cacheable_status_codes | |
Protected Member Functions | |
| str | _urlnorm (cls, str uri) |
| HTTPResponse|None | _load_from_cache (self, PreparedRequest request) |
| None | _cache_set (self, str cache_url, PreparedRequest request, HTTPResponse response, bytes|None body=None, int|None expires_time=None) |
An interface to see if request should cached or not.
|
protected |
Store the data in the cache.
|
protected |
Load a cached response, or return None if it's not available.
|
protected |
Normalize the URL to create a safe key for the cache
| None pip._vendor.cachecontrol.controller.CacheController.cache_response | ( | self, | |
| PreparedRequest | request, | ||
| HTTPResponse | response, | ||
| bytes | None | body = None, |
||
| Collection[int] | None | status_codes = None |
||
| ) |
Algorithm for caching requests. This assumes a requests Response object.
| HTTPResponse | Literal[False] pip._vendor.cachecontrol.controller.CacheController.cached_request | ( | self, | |
| PreparedRequest | request | ||
| ) |
Return a cached response if it exists in the cache, otherwise return False.
| HTTPResponse pip._vendor.cachecontrol.controller.CacheController.update_cached_response | ( | self, | |
| PreparedRequest | request, | ||
| HTTPResponse | response | ||
| ) |
On a 304 we will get a new set of headers that we want to update our cached value with, assuming we have one. This should only ever be called when we've sent an ETag and gotten a 304 as the response.