Module http_cache

Source
Expand description

A memory cache implementing the logic specified in http://tools.ietf.org/html/rfc7234 and http://tools.ietf.org/html/rfc7232.

Structsยง

CacheKey
The key used to differentiate requests in the cache.
CachedMetadata ๐Ÿ”’
Metadata about a loaded resource, such as is obtained from HTTP headers.
CachedResource ๐Ÿ”’
A complete cached resource.
CachedResponse
Wrapper around a cached response, including information on re-validation needs
HttpCache
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