werkzeug.RequestCacheControl
¶
-
class
werkzeug.
RequestCacheControl
(values=(), on_update=None)[source]¶ A cache control for requests. This is immutable and gives access to all the request-relevant cache control headers.
To get a header of the
RequestCacheControl
object 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 () |
|
copy (() -> a shallow copy of D) |
|
fromkeys (keys[, value]) |
|
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 () |
|
setdefault (key[, default]) |
|
to_header () |
Convert the stored values into a cache control header. |
update (*args, **kwargs) |
|
values (() -> list of D’s values) |
|
viewitems (...) |
|
viewkeys (...) |
|
viewvalues (...) |
Attributes¶
max_age |
accessor for ‘max-age’ |
max_stale |
accessor for ‘max-stale’ |
min_fresh |
accessor for ‘min-fresh’ |
no_cache |
accessor for ‘no-cache’ |
no_store |
accessor for ‘no-store’ |
no_transform |
accessor for ‘no-transform’ |
on_update |
|
only_if_cached |
accessor for ‘only-if-cached’ |