[pull] main from jsr-io:main#103
Merged
Merged
Conversation
## What Drops `stale-while-revalidate=86400` from `CACHE_CONTROL_MANIFEST` (the cache-control for package and npm version `meta.json` manifests): ``` - public, max-age=60, s-maxage=60, stale-while-revalidate=86400 + public, max-age=60, s-maxage=60 ``` ## Why After a publish, a new version only becomes visible to Deno's resolver once the edge re-fetches the regenerated `meta.json`. We explicitly purge Cloudflare on publish, but that purge is best-effort, so the cache-control is the durability net. The SWR window was that net's weak point: it let an edge keep serving a **stale** manifest for up to 24h. And critically, SWR bought us nothing here — the lb serves a cached entry on a hit *without re-fetching* (see `proxyToR2`), so the background "revalidation" SWR implies never actually happens; it only extends the stale window. Without SWR, a request past `s-maxage` is an unambiguous miss that forces an R2 re-fetch. This caps worst-case post-publish resolver staleness at **`s-maxage` (~60s)** instead of **up to 24h**. ## Trade-off to review This slightly increases manifest re-fetches from R2 (the edge can no longer lean on a stale copy past `s-maxage`), but `s-maxage=60` still bounds that to roughly one R2 fetch per package per minute per PoP. Worth a sanity check. ## Not in scope Eliminating the remaining ~60s floor (`s-maxage`) requires a purge-key redesign — the manifest is keyed under the synthetic `bucket-cache.jsr.internal` host (#1440), which isn't zone-purgeable by URL — and is intentionally left out of this change.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )