From the art.krz.sh incident: when DeviantArt bans the egress address every DA-backed page 502s until someone restarts the stack.
- Entries past
ttlare kept forapi-cache.stale(default1h,0idisables) and served when the fetch fails or answers 403/429. The daily deviations, popular searches and feeds stay up through a short ban. - A 403/429 starts a one minute backoff: misses with nothing stale get the block response back with no upstream call, so a banned instance stops hammering the WAF.
- Stats line gains a "served stale" count. SETUP.md documents
stale.
Five new tests over a controllable clock: stale on block, stale on transport error, backoff skips upstream then recovers, stale dropped after the window, stale 0 keeps nothing. One existing test now uses a 500, since a 403 is a block.