support cache-control: immutable
Open
Nobody has claimed this yet.
feature
sprintable
- Dominant language
- Python
- Stars
- 443
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Description
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(...)`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Response.cache_expires and response.cache_control entry points shown in the issue, then inspect how they produce the Cache-Control header in headerlist. The work is done when both immutable=True forms include immutable in the generated Cache-Control value, without requiring manual header editing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100