Change the CachedClient to support HTTP caching directives
- Dominant language
- Go
- Stars
- 714
- Forks
- 64
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 58
Description
The motivation is that retriable errors should always retry (rather than cache).
Even if they don't have `Cache-Control: no-store` directive, 5XX errors should also not be cached.
This is what we'd want to update: https://github.com/google/oss-rebuild/blob/5bde322b7e50338183856c1143ca0b5ed80a40ad/internal/httpx/http.go#L45-L73
See these mozilla docs: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching
Contributor guide
Research direction
Read internal/httpx/http.go around lines 45-73 and consult the linked Mozilla caching guidance. Trace the CachedClient behavior for retriable errors, Cache-Control: no-store, and 5XX responses; done means those cases are not cached and retriable errors retry as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100