Proper `Cache-Control: private` support
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 505
- Forks
- 149
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
Responses where Cache-Control is set to private may be cached but must not be cached in a shared cache. I have a use of cachecontrol for an API client I'm writing, but it has support for multiple users, so I need to implement user-specific caching support soon.
My idea for how to implement it is to have a parameter you pass to CacheControl with a header name. Then when a response has Cache-Control: private set it would try to fetch a header with that key from the request/response and then then prepend a hash of that to the cache key.
I currently have it implemented locally for the redis backend, though it's currently very implementation specific, only checking for Authorization, and only for the redis backend.
Any thoughts/opinion on this idea?
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 reviewing CacheControl's cache-key handling and the Redis backend, then compare the existing Authorization-specific local implementation mentioned in the issue. Done means the project has an agreed, backend-independent approach for keeping private responses separate for different users, with its configuration and behavior specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100