Cached records are cleared without regard to Vary header
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 505
- Forks
- 149
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
I'm accessing a REST API that returns different data structures based on the Accept header. Cachecontrol seems to be properly handling the Vary: Accept, Accept-Encoding that the server sends back when making requests, that's good. What becomes an issue is when one of the content type variants send back Cache-Control: no-store, Cachecontrol just blows away the other cached record without regard to the secondary key provided by Vary.
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 in cachecontrol/controller.py at lines 287-289, where the issue reports that a no-store response clears cached records. Reproduce the case with multiple Accept variants and Vary: Accept, Accept-Encoding. Done means a no-store variant no longer removes the other cached variants.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100