Expand description
A memory cache implementing the logic specified in http://tools.ietf.org/html/rfc7234 and http://tools.ietf.org/html/rfc7232.
Structsยง
- Cache
Key - The key used to differentiate requests in the cache.
- Cached
Metadata ๐ - Metadata about a loaded resource, such as is obtained from HTTP headers.
- Cached
Resource ๐ - A complete cached resource.
- Cached
Response - Wrapper around a cached response, including information on re-validation needs
- Http
Cache - A memory cache.
Functionsยง
- calculate_
response_ ๐age - Calculating Age https://tools.ietf.org/html/rfc7234#section-4.2.3
- create_
cached_ ๐response - Create a CachedResponse from a request and a CachedResource.
- create_
resource_ ๐with_ bytes_ from_ resource - Create a new resource, based on the bytes requested, and an existing resource, with a status-code of 206.
- get_
expiry_ ๐adjustment_ from_ request_ headers - Request Cache-Control Directives https://tools.ietf.org/html/rfc7234#section-5.2.1
- get_
response_ ๐expiry - Determine the expiry date from relevant headers, or uses a heuristic if none are present.
- handle_
range_ ๐request - Support for range requests https://tools.ietf.org/html/rfc7233.
- is_
cacheable_ ๐by_ default - Determine if a response is cacheable by default https://tools.ietf.org/html/rfc7231#section-6.1
- response_
is_ ๐cacheable - Determine if a given response is cacheable. Based on https://tools.ietf.org/html/rfc7234#section-3