Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Cache-Control extensions #1185

mfr-itr opened this issue Oct 20, 2017 · 2 comments · Fixed by #1648

Support Cache-Control extensions #1185

mfr-itr opened this issue Oct 20, 2017 · 2 comments · Fixed by #1648


Copy link

@mfr-itr mfr-itr commented Oct 20, 2017

I'm thinking specifically about
Maybe add a dict str -> (str or None) which maps the extension name to the optional payload?

Copy link

@jab jab commented Feb 13, 2018

@mitsuhiko and other maintainers, would you accept a PR implementing Cache-Control: Immutable (via e.g. response.cache_control.immutable = True)?

@pallets pallets deleted a comment from moi90 Aug 1, 2018
Copy link

@davidism davidism commented Sep 18, 2019

This is still marked experimental on MDN, I'm not sure I want to add that yet. Werkzeug already provides the tools to include whatever experimental options you want:

# cache_control is also a dict
# None means set for bool options
response.cache_control["immutable"] = None

# or add the property
from werkzeug.datastructures import ResponseCacheControl, cache_property

ResponseCacheControl.immutable = cache_property("immutable", None, bool)
response.cache_control.immutable = True

@davidism davidism added this to the 1.0.0 milestone Sep 20, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

Successfully merging a pull request may close this issue.

3 participants