fix(web): bound read-API CDN staleness at an hour#4
Merged
Conversation
The edge cache is URL-keyed and tag-blind: /api/revalidate flushes the server-side Data Cache but cannot purge already-cached CDN responses, which the day-scale stale-while-revalidate window let serve pre-rewrite data for up to 24 hours after the 2026-07-07 historical backfill. An hour bounds that skew at the cost of at most one extra function invocation per URL per hour. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Vercel preview for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Read-API responses are edge-cached per URL with
stale-while-revalidate=86400, and the edge cache is tag-blind —/api/revalidateflushes the server-side Data Cache but cannot purge CDN entries. That was invisible while data only appended (a stale serve was seconds out of date), but the 2026-07-07 historical backfill rewrote fineweb/appian history and charts kept showing pre-rewrite counts (e.g. "latest 100 of 108" against 2,091 real commits) until each URL's day-long stale window lapsed. This shrinks the window to an hour, bounding post-rewrite skew at the cost of at most one extra function invocation per URL per hour on a low-traffic site. The 5-minute fresh window is unchanged.🤖 Generated with Claude Code