google / google/oss-rebuild

Change the CachedClient to support HTTP caching directives

Open
#409 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.