werkzeug.ResponseCacheControl¶
-
class
werkzeug.ResponseCacheControl(values=(), on_update=None)[source]¶ A cache control for responses. Unlike
RequestCacheControlthis is mutable and gives access to response-relevant cache control headers.To get a header of the
ResponseCacheControlobject again you can convert the object into a string or call theto_header()method. If you plan to subclass it and add your own items have a look at the sourcecode for that class.New in version 0.5: In previous versions a CacheControl class existed that was used both for request and response.
Methods¶
__init__([values, on_update]) |
|
cache_property(key, empty, type) |
Return a new property object for a cache header. |
clear(*args, **kw) |
|
copy(() -> a shallow copy of D) |
|
fromkeys(...) |
v defaults to None. |
get((k[,d]) -> D[k] if k in D, ...) |
|
has_key((k) -> True if D has a key k, else False) |
|
items(() -> list of D’s (key, value) pairs, ...) |
|
iteritems(() -> an iterator over the (key, ...) |
|
iterkeys(() -> an iterator over the keys of D) |
|
itervalues(...) |
|
keys(() -> list of D’s keys) |
|
pop(key[, default]) |
|
popitem(*args, **kw) |
|
setdefault(key[, default]) |
|
to_header() |
Convert the stored values into a cache control header. |
update(*args, **kw) |
|
values(() -> list of D’s values) |
|
viewitems(...) |
|
viewkeys(...) |
|
viewvalues(...) |
Attributes¶
max_age |
accessor for ‘max-age’ |
must_revalidate |
accessor for ‘must-revalidate’ |
no_cache |
accessor for ‘no-cache’ |
no_store |
accessor for ‘no-store’ |
no_transform |
accessor for ‘no-transform’ |
on_update |
|
private |
accessor for ‘private’ |
proxy_revalidate |
accessor for ‘proxy-revalidate’ |
public |
accessor for ‘public’ |
s_maxage |
accessor for ‘s-maxage’ |