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: immutable #341

Open
mmerickel opened this issue Jan 8, 2018 · 0 comments
Open

support cache-control: immutable #341

mmerickel opened this issue Jan 8, 2018 · 0 comments

Comments

@mmerickel
Copy link
Member

mmerickel commented Jan 8, 2018

response.cache_control.immutable = True and response.cache_expires(86400, immutable=True) should work.

>>> r = Response()
>>> r.cache_expires(86400, public=True, immutable=True)
>>> r.headerlist
[('Content-Type', 'text/html; charset=UTF-8'),
 ('Content-Length', '0'),
 ('Expires', 'Tue, 09 Jan 2018 17:17:03 GMT'),
 ('Cache-Control', 'max-age=86400, public')]  # expect to see immutable in the list

Currently I can only set it manually via r.headers['Cache-Control'] += ', immutable' after calling r.cache_expires(...)`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant