Skip to content

Serve stale (grace) only on upstream failure#11

Merged
roboshyim merged 1 commit into
masterfrom
feat/stale-if-error
Jan 31, 2026
Merged

Serve stale (grace) only on upstream failure#11
roboshyim merged 1 commit into
masterfrom
feat/stale-if-error

Conversation

@roboshyim

Copy link
Copy Markdown
Owner

Changes grace behavior to stale-if-error:

  • Fresh objects are served immediately
  • Expired-but-within-grace objects trigger an origin refresh
  • If origin fails (network) or returns 5xx, we serve the stale object and mark it with x-codycache: STALE

Closes #5.

@roboshyim roboshyim force-pushed the feat/stale-if-error branch from faefbb0 to a706cef Compare January 31, 2026 10:31
@roboshyim roboshyim merged commit 418254b into master Jan 31, 2026
2 checks passed
@roboshyim roboshyim deleted the feat/stale-if-error branch January 31, 2026 10:31
This was referenced Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grace behavior: serve stale only on upstream failure (stale-if-error)

1 participant