Directives#
- class requests_cache.policy.directives.CacheDirectives(expires=None, immutable=False, max_age=None, max_stale=None, min_fresh=None, must_revalidate=False, no_cache=False, no_store=False, only_if_cached=False, stale_if_error=None, stale_while_revalidate=None, etag=None, last_modified=None)[source]#
Bases:
RichMixin
Parses Cache-Control directives and other relevant cache settings from either request or response headers
- Parameters:
- classmethod from_headers(headers)[source]#
Parse cache directives and other settings from request or response headers
- Parameters:
headers (
MutableMapping
[str
,str
]) –