Background:
Current cache behavior is strict hit or miss. There is no stale serving strategy during backend slowness.
Problem:
Without stale-while-revalidate, p95 and p99 can degrade sharply during transient backend latency spikes.
Scope:
- Extend cache manager and CacheRead policy to support stale-while-revalidate behavior.
- Keep authenticated-cache safety and vary-by requirements unchanged.
- Update behavior docs in docs/cache-guide.md after implementation.
Tasks:
Acceptance Criteria:
- Stale responses can be served within configured stale window.
- Background refresh does not break request path.
- Authenticated cache invariants and validation rules are preserved.
Background:
Current cache behavior is strict hit or miss. There is no stale serving strategy during backend slowness.
Problem:
Without stale-while-revalidate, p95 and p99 can degrade sharply during transient backend latency spikes.
Scope:
Tasks:
Acceptance Criteria: