Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
pip._vendor.cachecontrol.controller.CacheController Class Reference

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)
 

Detailed Description

An interface to see if request should cached or not.

Member Function Documentation

◆ _cache_set()

None pip._vendor.cachecontrol.controller.CacheController._cache_set (   self,
str  cache_url,
PreparedRequest  request,
HTTPResponse  response,
bytes | None   body = None,
int | None   expires_time = None 
)
protected
Store the data in the cache.

◆ _load_from_cache()

HTTPResponse | None pip._vendor.cachecontrol.controller.CacheController._load_from_cache (   self,
PreparedRequest  request 
)
protected
Load a cached response, or return None if it's not available.

◆ _urlnorm()

str pip._vendor.cachecontrol.controller.CacheController._urlnorm (   cls,
str  uri 
)
protected
Normalize the URL to create a safe key for the cache

◆ cache_response()

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.

◆ cached_request()

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.

◆ update_cached_response()

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.

The documentation for this class was generated from the following file: