Add caching headers and conditional requests to read endpoints
Read endpoints that re-send identical payloads, given validators so clients can skip the transfer.
The ticket
Add cache validators and conditional request handling to read endpoints.
Acceptance criteria
- Responses carry a validator and an explicit cache directive
- A conditional request returns a not-modified response
- Payload savings are measured
- Private data is not marked publicly cacheable
What lands as proof
A conditional request test plus the measured saving, so the benefit is shown rather than assumed.
Why teams defer it
- It costs bandwidth rather than correctness, so it never surfaces as a bug.
- Getting the directives wrong can cache private data, which makes people cautious enough to skip it.
Questions
- What does the agent actually change?
- The ticket is scoped to one outcome: add cache validators and conditional request handling to read endpoints. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.
- How do I know the work is done?
- The pull request carries the evidence, not only the diff. Here that means cache behaviour asserted, payload savings measured, so a reviewer can confirm the result without reproducing the work locally.
- How much oversight does this need?
- The run stops once the plan is written. Somebody reads the approach and approves it before any code exists, which is the cheapest moment to redirect the work.