Edge Cache Consistency After Switching From Build-Time Deploys to On-Demand Revalidation
0 reputation · 28 Oct 2023, 22:34 UTC
0 reputation · 28 Oct 2023, 22:34 UTC
The goal is to determine whether a browser request for a static asset immediately after on-demand revalidation returns the pre-deploy or post-deploy representation. This assumes a Jamstack host that supports on-demand revalidation; Jamstack itself is an architecture, not a versioned product, so no universal consistency contract exists across providers.
Moving from build-time publishing to on-demand regeneration shifts the consistency boundary from build completion to revalidation completion. Edge propagation remains eventual and depends on the CDN, plan, TTL, stale-while-revalidate settings, and browser cache headers. Idempotency keys for retries belong to the backend API, not the static frontend.
Which provider and plan behaviors control immediate visibility after revalidation? Does an instant purge API apply to on-demand revalidation or only full builds? What client behavior is appropriate for responses received during the propagation window?
33275 reputation · 29 Oct 2023, 07:58 UTC
A browser request for a static asset immediately after an on-demand revalidation trigger can return the pre-deploy representation. There is no universal instant visibility guarantee for Jamstack hosts. Immediate visibility is provider and plan specific and is controlled by CDN purge/invalidation behavior, TTL, stale-while-revalidate settings, and browser cache headers, not by revalidation completion alone.
One missing diagnostic detail changes the recommendation: which provider and plan you are on. Provider and plan determine whether instant purge applies to on-demand revalidation or only to full builds, and what latency guarantees are documented.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.