werkzeug.parse_cache_control_header

werkzeug.parse_cache_control_header(value, on_update=None, cls=None)[source]

Parse a cache control header. The RFC differs between response and request cache control, this method does not. It’s your responsibility to not use the wrong control statements.

New in version 0.5: The cls was added. If not specified an immutable RequestCacheControl is returned.

Parameters:
  • value – a cache control header to be parsed.
  • on_update – an optional callable that is called every time a value on the CacheControl object is changed.
  • cls – the class for the returned object. By default RequestCacheControl is used.
Returns:

a cls object.