Skip to content

Experimental incremental static builds#17084

Draft
matthewp wants to merge 8 commits into
mainfrom
incremental-v2
Draft

Experimental incremental static builds#17084
matthewp wants to merge 8 commits into
mainfrom
incremental-v2

Conversation

@matthewp

Copy link
Copy Markdown
Contributor

Changes

  • Adds experimental.incrementalBuild flag that skips regenerating static pages whose module dependencies and user-provided cacheKey are unchanged from the previous build.
  • Applies only to pages returned from getStaticPaths() that include a cacheKey. Static pages without a cacheKey are always re-rendered.
  • When enabled, dist/ is preserved between builds instead of being emptied. Orphaned output files (pages removed from getStaticPaths) are cleaned up automatically.
  • A cache manifest (incremental-build.json) is stored in node_modules/.astro/ alongside the existing content layer cache. Dependency hashes are computed from the Rolldown module graph including source file contents, so layout/component changes correctly invalidate cached pages.
  • For CI, both node_modules/.astro/ and dist/ must be preserved between builds for skipping to take effect. If dist/ is missing, cached pages are re-rendered.

Testing

  • New integration test incremental-build.test.ts with 9 assertions across 6 scenarios: first build, unchanged rebuild (cache hit), missing output file (forces re-render), changed dependency (invalidates all route paths), changed cacheKey (selective re-render), and flag-disabled regression (verifies dist/ is still emptied and no cache manifest is written).

Docs

  • No docs PR yet. This is an experimental flag behind experimental.incrementalBuild.
@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7785bea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 390 packages
Name Type
astro Minor
@e2e/astro-linked-lib Patch
@e2e/actions-blog Patch
@e2e/actions-react-19 Patch
@e2e/astro-component Patch
@e2e/astro-envs Patch
@e2e/astro-island-hydration-error Patch
@test/astro-cloudflare-node-prerender-mdx Patch
@test/astro-cloudflare Patch
@e2e/content-collections Patch
@e2e/csp-server-islands Patch
@e2e/css Patch
@test/custom-client-directives Patch
@e2e/dev-toolbar Patch
@e2e/error-cyclic Patch
@e2e/error-sass Patch
@e2e/errors Patch
@e2e/hydration-race Patch
@e2e/i18n Patch
@test/nested-style-bug-e22e Patch
@e2e/preact-compat-component Patch
@e2e/preact-component Patch
@e2e/preact-lazy-component Patch
@e2e/prefetch Patch
@e2e/react-component Patch
@e2e/server-islands-key Patch
@e2e/server-islands Patch
@e2e/solid-circular Patch
@e2e/solid-component Patch
@e2e/solid-recurse Patch
@e2e/svelte-component Patch
@e2e/e2e-tailwindcss Patch
@e2e/ts-resolution Patch
@e2e/view-transitions Patch
@e2e/vite-virtual-modules Patch
@e2e/vue-component Patch
@performance/md Patch
@performance/mdoc Patch
@performance/mdx Patch
@test/0-css Patch
fake-astro-library Patch
@test/actions Patch
@test/alias-path-alias-style Patch
@test/ts-paths-no-baseurl Patch
@test/aliases-tsconfig Patch
@test/aliases Patch
@test/api-routes Patch
@test/asset-query-params-chunks Patch
@test/asset-url-base Patch
@test/astro-pages Patch
@test/astro-assets-prefix Patch
@test/astro-assets Patch
@test/astro-basic Patch
@test/astro-check-errors Patch
@test/astro-check-no-errors Patch
@test/astro-check-watch Patch
@test/astro-children Patch
@test/astro-client-only Patch
@test/astro-component-bundling Patch
@test/astro-component-code Patch
@test/astro-css-bundling Patch
@test/astro-dev-headers Patch
@test/astro-dev-http2 Patch
@test/astro-doctype Patch
@test/astro-dynamic Patch
@test/astro-env-content-collections Patch
@test/astro-env-required-public Patch
@test/astro-env-server-fail Patch
@test/astro-env-server-secret Patch
@test/astro-env Patch
@test/astro-envs Patch
@test/astro-expr Patch
@test/astro-get-static-paths Patch
@test/astro-head Patch
@test/astro-manifest-client-script Patch
@test/astro-manifest-invalid Patch
@test/astro-manifest Patch
@test/astro-markdown-frontmatter-injection Patch
@test/astro-markdown-plugins Patch
@test/astro-markdown-remarkRehype Patch
@test/astro-markdown-skiki-default-color Patch
@test/astro-markdown-skiki-langs Patch
@test/astro-markdown-skiki-themes-custom Patch
@test/astro-markdown-skiki-themes-integrated Patch
@test/astro-markdown-skiki-wrap-false Patch
@test/astro-markdown-skiki-wrap-null Patch
@test/astro-markdown-skiki-wrap-true Patch
@test/astro-markdown-url Patch
@test/astro-markdown Patch
@test/astro-mode Patch
@test/astro-page-directory-url Patch
@test/astro-partial-html Patch
@test/astro-preview-allowed-hosts Patch
@test/astro-preview-headers Patch
@test/astro-public Patch
@test/astro-script-template-dedup Patch
@test/astro-scripts Patch
@test/astro-slots-nested Patch
@test/concurrency Patch
@test/build-readonly-file Patch
@test/cache-memory-query-include Patch
@test/cache-memory-query Patch
@test/client-address-node Patch
@test/client-only-css-chunk-leak Patch
@test/code-component Patch
@test/component-library Patch
@test/config-vite-css-target Patch
@test/config-vite Patch
@test/react-container Patch
@test/content-with-spaces-in-folder-name Patch
@test/content-collection-picture-render Patch
@example/content-collection-references Patch
@test/content-collection-tla-svg Patch
@test/content-collections-base Patch
@test/content-collections-empty-dir Patch
@test/content-collections-empty-md-file Patch
@test/content-collections-image-hmr Patch
@test/content-collections-mutation Patch
@test/content-collections-number-id Patch
@test/content-collections-type-inference Patch
@test/content-collections-with-config-mjs Patch
@test/content-collections Patch
@test/content-frontmatter Patch
@test/content-intellisense Patch
@test/content-layer-loader-schema-function Patch
@test/content-layer-remark-plugins Patch
@test/content-layer Patch
@test/content-ssr-integration Patch
@test/content-static-paths-integration Patch
@test/content Patch
@test/core-image-data-url Patch
@test/core-image-deletion-ssr Patch
@test/core-image-deletion Patch
@test/core-image-errors Patch
@test/core-image-fs-config Patch
@test/core-image-remark-infersize Patch
@test/core-image-layout Patch
@test/core-image-picture-emit-file Patch
@test/core-image-remark-imgattr Patch
@test/core-image-ssg Patch
@test/core-image-ssr Patch
@test/core-image-svg-in-client Patch
@test/core-image-svg Patch
@test/core-image-unconventional-settings Patch
@test/core-image Patch
@test/csp-adapter Patch
@test/csp-fonts Patch
@test/csp Patch
@test/css-assets Patch
@test/css-dangling-references Patch
@test/css-deduplication Patch
@test/css-double-bundle Patch
@test/css-dynamic-import-dev Patch
@test/css-import-as-inline Patch
@test/css-inline-stylesheets Patch
@test/css-no-code-split Patch
@test/css-path-case Patch
@test/css-pure-chunk-query-params Patch
@test/custom-404-injected-from-dep Patch
@test/custom-404-pkg Patch
custom-fetch-error-pages Patch
@test/custom-renderer Patch
@test/data-collections-schema Patch
@test/data-collections Patch
@test/debug-component Patch
@test/dev-container Patch
@test/dev-render Patch
@test/dev-request-url Patch
@test/dynamic-endpoint-collision Patch
@test/dynamic-route-build-file Patch
@test/endpoint-routing Patch
@test/error-bad-js Patch
@test/error-build-location Patch
@test/error-non-error Patch
@test/extension-matching Patch
@test/fetch Patch
@test/fonts Patch
@test/astro-fontsource-package Patch
@test/get-static-paths-pages Patch
@test/glob-pages-css Patch
@test/head-propagation-prerender-env Patch
@test/hmr-markdown Patch
@test/hmr-new-page Patch
@test/hmr-slots-render Patch
@test/hoisted-imports Patch
@test/html-component Patch
@test/html-escape Patch
@test/html-page Patch
@test/html-slots Patch
@test/hydration-race Patch
@test/i18n-client-import Patch
@test/i18n-css-leak-basic Patch
@test/import-ts-with-js Patch
@test/impostor-md-file Patch
@test/incremental-build Patch
@test/integration-add-page-extension Patch
@test/integration-server-setup Patch
@test/jsx-queue-rendering Patch
@test/large-array-solid Patch
@test/legacy-collections-backwards-compat Patch
@test/lightningcss-scoped-nesting Patch
@test/live-loaders Patch
@test/markdown Patch
@test/middleware-dev Patch
@test/middleware-full-ssr Patch
@test/middleware-no-user-middlewaqre Patch
@test/middleware-tailwind Patch
@test/minification-html-jsx Patch
@test/minification-html Patch
@test/non-ascii-path Patch
@test/non-html-pages Patch
@test/page-format Patch
@test/page-level-styles Patch
@test/parallel-components Patch
@test/partials-css-boundary Patch
@test/partials Patch
@test/passthrough-image-service Patch
@test/postcss Patch
@test/preact-compat-component Patch
@test/preact-component Patch
@test/remote-css Patch
@test/request-signal Patch
@test/reuse-injected-entrypoint Patch
@test/root-srcdir-css Patch
@test/scoped-style-strategy Patch
@test/server-entry-fake-adapter Patch
@test/server-entry Patch
@test/server-islands-hybrid Patch
@test/server-islands-ssr Patch
@test/sessions Patch
@test/slots-preact Patch
@test/slots-react Patch
@test/slots-solid Patch
@test/slots-svelte Patch
@test/slots-vue Patch
@test/solid-component Patch
@test/sourcemap Patch
@test/space-in-folder-name Patch
@test/special-chars-in-component-imports Patch
@test/ssr-assets Patch
@test/ssr-dynamic Patch
@test/ssr-partytown Patch
@test/ssr-prerender-get-static-paths Patch
@test/ssr-prerender Patch
@test/ssr-preview Patch
@test/ssr-renderers-static-vue Patch
@test/ssr-request Patch
@test/ssr-hoisted-script Patch
@test/ssr-scripts Patch
@test/static-build-code-component Patch
@test/static-build-dir Patch
@test/static-build-frameworks Patch
@test/static-build-page-url-format Patch
@test/static-build-ssr Patch
@test/static-build Patch
@test/static-redirect Patch
@test/svelte-component Patch
@test/svg-deduplication Patch
@test/tailwindcss Patch
@e2e/third-party-astro Patch
@test/url-import-suffix Patch
@test/view-transitions Patch
@test/virtual-astro-file Patch
@test/vitest Patch
@test/vue-component Patch
@test/vue-with-multi-renderer Patch
@test/alpinejs-basics Patch
@test/alpinejs-directive Patch
@test/alpinejs-plugin-script-import Patch
@test/astro-cloudflare-allowed-hosts Patch
@test/astro-cloudflare-astro-dev-platform Patch
@test/astro-cloudflare-astro-env Patch
@test/astro-cloudflare-binding-image-service Patch
@test/astro-cloudflare-cache-provider-wait-until Patch
@test/astro-cloudflare-client-address Patch
@test/astro-cloudflare-compile-image-service Patch
@test/astro-cloudflare-custom-entryfile Patch
@test/astro-cloudflare-dev-image-endpoint Patch
@test/astro-cloudflare-external-image-service Patch
@test/astro-cloudflare-external-redirects Patch
@test/astro-cloudflare-internal-redirects Patch
@test/astro-cloudflare-no-output Patch
@test/astro-cloudflare-prerender-node-env Patch
@test/astro-cloudflare-prerender-queue-consumers Patch
@test/astro-cloudflare-prerender-styles Patch
@test/astro-cloudflare-prerenderer-errors Patch
@test/routing-priority-cloudflare Patch
@test/cf-server-entry Patch
@test/astro-cloudflare-server-island-prerender-framework Patch
@test/astro-cloudflare-sql-import Patch
@test/cf-ssr-deps Patch
@test/astro-cloudflare-static Patch
@test/astro-cloudflare-svelte-rune-deps Patch
@test/astro-cloudflare-top-level-return Patch
@test/cf-user-optimize-deps Patch
@test/astro-cloudflare-vite-plugin Patch
@test/astro-cloudflare-with-base Patch
@test/astro-cloudflare-with-react Patch
@test/astro-cloudflare-with-solid-js Patch
@test/astro-cloudflare-with-svelte Patch
@test/astro-cloudflare-with-vue Patch
@test/astro-cloudflare-wrangler-preview-platform Patch
@test/markdoc-content-collections Patch
@test/content-layer-markdoc Patch
@test/headings-custom Patch
@test/headings Patch
@test/image-assets-custom Patch
@test/image-assets Patch
@test/markdoc-propagated-assets Patch
@test/markdoc-render-with-space Patch
@test/markdoc-render-html Patch
@test/markdoc-render-null Patch
@test/markdoc-render-partials Patch
@test/markdoc-render-simple Patch
@test/markdoc-render-table-attrs Patch
@test/markdoc-render-typographer Patch
@test/markdoc-render-with-components Patch
@test/markdoc-render-with-config Patch
@test/markdoc-render-with-extends-components Patch
@test/markdoc-render-with-indented-components Patch
@test/markdoc-render-with-transform Patch
@test/markdoc-variables Patch
@test/content-layer-rendering Patch
@test/mdx-css-head-mdx Patch
@test/image-remark-imgattr Patch
@test/mdx-astro-container-escape Patch
@test/mdx-frontmatter-injection Patch
@test/netlify-skew-protection Patch
@test/netlify-hosted-astro-project Patch
@test/nodejs-api-route Patch
@test/nodejs-badurls Patch
@test/nodejs-encoded Patch
@test/nodejs-errors Patch
@test/nodejs-headers Patch
@test/nodejs-image Patch
@test/locals Patch
@test/node-middleware Patch
@test/nodejs-prerender-404-500 Patch
@test/nodejs-prerender Patch
@test/nodejs-prerendered-error-page-fetch Patch
@test/nodejs-preview-headers Patch
@test/redirects Patch
@test/node-sessions Patch
@test/ssr-assets-middleware Patch
@test/node-static-headers Patch
@test/node-trailingslash Patch
@test/url Patch
@test/well-known-locations Patch
@test/react-component Patch
@test/sitemap-chunks Patch
@test/sitemap-dynamic Patch
@test/sitemap-i18n-fallback Patch
@test/sitemap-ssr Patch
@test/sitemap-static Patch
@test/sitemap-trailing-slash Patch
async-rendering Patch
conditional-rendering Patch
@test/empty-class Patch
svelte-prop-types Patch
@test/astro-vercel-basic Patch
@test/astro-vercel-image Patch
@test/astro-vercel-integration-assets Patch
@test/vercel-isr Patch
@test/vercel-max-duration Patch
@test/vercel-edge-middleware-with-edge-file Patch
@test/vercel-edge-middleware-without-edge-file Patch
@test/astro-vercel-no-output Patch
@test/astro-vercel-prerendered-error-pages Patch
@test/astro-vercel-redirects-serverless Patch
@test/astro-vercel-redirects Patch
@test/vercel-server-islands Patch
@test/astro-vercel-serverless-prerender Patch
@test/astro-vercel-serverless-with-dynamic-routes Patch
@test/astro-vercel-static-assets Patch
@test/vercel-static-headers Patch
@test/astro-vercel-static Patch
@test/vercel-streaming Patch
@test/astro-vercel-with-web-analytics-enabled-output-as-static Patch
vercel-hosted-astro-project Patch
@test/vue-app-entrypoint-async Patch
@test/vue-app-entrypoint-css Patch
@test/vue-app-entrypoint-no-export-default Patch
@test/vue-app-entrypoint-relative Patch
@test/vue-app-entrypoint-src-absolute Patch
@test/vue-app-entrypoint Patch
@test/vue-basics Patch
vue-prop-types Patch
astro-benchmark Patch
@benchmark/adapter Major
@benchmark/timer Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added pkg: astro Related to the core `astro` package (scope) docs pr semver: minor Change triggers a `minor` release labels Jun 15, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@codspeed-hq

codspeed-hq Bot commented Jun 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 18 untouched benchmarks


Comparing incremental-v2 (7785bea) with main (4c4a91c)

Open in CodSpeed
@matthewp matthewp added pr preview Apply this label to a PR to generate a preview release and removed pr preview Apply this label to a PR to generate a preview release labels Jun 15, 2026
@matthewp matthewp added pr preview Apply this label to a PR to generate a preview release and removed pr preview Apply this label to a PR to generate a preview release labels Jun 15, 2026
@github-actions github-actions Bot removed the pr preview Apply this label to a PR to generate a preview release label Jun 15, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 15, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/astro@17084

commit: 7785bea

@deepanshu88

Copy link
Copy Markdown

@matthewp This is going to be a game changer for large sites! Can't wait to test the preview.

Quick technical note on caching dist/ for Cloudflare: turning on Cloudflare's Native Build Cache (Settings > Build > Build cache > Enable) handles node_modules/.astro automatically, but my understanding is that it wipes the dist/ directory between builds.

@matthewp

Copy link
Copy Markdown
Contributor Author

@deepanshu88 ok good to know. Which folders are cached isn't configurable? I considered caching the files in the node_modules/.astro/ folder but wanted to avoid duplicate writes.

@matthewp matthewp added the pr preview Apply this label to a PR to generate a preview release label Jun 16, 2026
@github-actions github-actions Bot removed the pr preview Apply this label to a PR to generate a preview release label Jun 16, 2026
@deepanshu88

deepanshu88 commented Jun 16, 2026

Copy link
Copy Markdown

@matthewp Unfortunately, Cloudflare's Native Build Cache isn't granularly configurable via settings or config files. For astro, it uses this cache directory - node_modules/.astro for reuse in subsequent builds.

What if we only perform the duplicate write to node_modules/.astro/dist-cache/ when a specific CI-optimized flag or a fallback mode is triggered? Astro boots up and looks at ./dist. if It's completely empty, instead of re-render everything from scratch, Astro checks node_modules/.astro/project-cache/ and if it sees the backup HTML pages from Build1 are safe and sound. Before the actual compilation even begins, Astro instantly copy-pastes those backup HTML files out of node_modules/ and drops them right back into the empty ./dist folder. A 2x write penalty is a one-time infrastructure seeding cost.

@matthewp

Copy link
Copy Markdown
Contributor Author

Yeah we'll probably need to do something like that. This PR is still early and being tested to make sure the gains are significant enough. Assuming it is we'll figure out the different CI environment stuff.

@deepanshu88

Copy link
Copy Markdown

Sounds like a good plan. Let me know if you need any large scale static sites to benchmark against once the PR is ready for public eyes - happy to help test it.

@matthewp

Copy link
Copy Markdown
Contributor Author

@deepanshu88 It's ready to test now, with the caveat that you mentioned. So I would just test locally.

Note that if you are on Astro 6 there are other changes in Astro 7 that improve perf, so you'd want to test your baseline, then do an Astro 7 upgrade, and then use this.

@matthewp matthewp added the pr preview Apply this label to a PR to generate a preview release label Jun 16, 2026
@github-actions github-actions Bot removed the pr preview Apply this label to a PR to generate a preview release label Jun 16, 2026
@matthewp matthewp added the pr preview Apply this label to a PR to generate a preview release label Jun 16, 2026
@github-actions github-actions Bot removed the pr preview Apply this label to a PR to generate a preview release label Jun 16, 2026
@matthewp

Copy link
Copy Markdown
Contributor Author

@deepanshu88 The newest preview moves the cache into node_modules/.astro/dist/ so it should work in Worker Builds now. I didn't see any real performance penalty to this new caching strategy.

@deepanshu88

Copy link
Copy Markdown

@matthewp That’s awesome to hear! Thanks for adding it and testing the same. Currently I am on Astro 6. I will upgrade to Astro 7 first to test the same.

@IEvangelist

Copy link
Copy Markdown

Took this PR for a real-site spin today on aspire.dev — a 20,028‑page Starlight docs site (Aspire + lots of generated C#/TS API reference). Wanted to share what I found, because there are some genuinely great wins in here. 🎉

Setup

The site is pinned to astro@^6.4.6 + @astrojs/starlight@^0.39.3, so the published pkg.pr.new build (astro@7.0.0-beta.4) didn't drop in — pnpm pulled @astrojs/mdx@5.0.6 and that of course can't import from the new astro 7 export map. So I cherry-picked the 7 commits from incremental-v2 onto the astro@6.4.8 tag (two trivial experimental config conflicts; merged both sides), built, packed, and dropped that tarball in. Clean install, no peer drama.

Then I added cacheKey to all 7 dynamic routes (the C# + TS API reference pages and the samples page), keyed by ${pkg.data.package.name}@${pkg.data.package.version ?? ''} plus the per‑page identifier.

Numbers (Windows host, single run each, pnpm build)

Scenario Wall Built Cached
Cold (--force) 904 s (~15 min) 20,028 0
Warm no‑op 756 s 13,881 6,147
Bump one package's version 749 s 13,884 (+3) 6,144 (−3)

The really nice finding 🥇

The content‑collection escape hatch (isContentDataIncrementalModule) works exactly as designed. Bumping the version field on one package JSON re‑rendered exactly 3 paths — the package landing, the type page, and the memberKind page for that one package — and left the other 6,144 cached entries untouched.

For contrast, on a smaller site of mine where I was loading data via plain import articles from './data/articles.json', the same kind of single‑entry edit invalidated all 240 article pages, because raw imports aren't marked as content‑data and get hashed into the per‑route dependencyHash. Bottom line: the content‑collection hatch is what makes this PR sing on real Starlight‑shaped sites. Worth flagging in the docs so folks lean into getCollection()-backed pipelines.

Caching profile (no‑op build, by route shape)

Where it caches (~6,147 pages, ~100 % of opted‑in routes):

Route Cached
csharp/[package]/[type]/[kind]/index.html 2,339
csharp/[package]/[type]/index.html 1,509
csharp/[package]/index.html 158
typescript/[module]/... 2,115
samples/... 26

Where it can't (yet) — a couple of opportunity areas worth chewing on:

  1. Starlight markdown / MDX pages (~13,500 rebuilt). All the English docs, every localized mirror, integration pages, blog — they don't go through getStaticPaths() so there's no cacheKey surface to use. This is by far the biggest delta between "what I cache" and "what's in the build."

  2. Companion outputs from astro:build:done hooks (~3,848 rebuilt). Specifically the .md files starlight-llms-txt emits next to each HTML page. The HTML version of these routes does cache, but recordPath tracks the route's primary output, so the .md companion re‑emits each build. The shape of the data is striking — the cached/built counts shift by exactly one layer at each level:

    Route layer Built (.md) Cached (.html)
    csharp/[package]/ 1,509 158
    csharp/[package]/[type]/ 2,339 1,509
    csharp/[package]/[type]/[kind] 0 2,339

Both feel like additive features rather than redesigns — happy to dig in on either if it'd help.

Net for aspire.dev

  • ~16 % wall‑clock saved on a true no‑op today (around 2.5 min per CI build). That's already a real win on a build this size, and the floor before any of the above gets addressed.
  • Surgical invalidation works: a single‑package data change costs only the 3 pages that actually changed. 🎯
  • Cherry‑picking the PR cleanly onto astro@6.x is straightforward, which made testing on a real Starlight site possible — worth keeping in mind for anyone else who wants to try this against ecosystem code that hasn't moved to 7 yet.

Really impressed with the design — cacheKey is a clean opt‑in surface, the content‑data exclusion is exactly the right hatch, and the persisted node_modules/.astro/dist/ cache makes this CI‑friendly out of the box. Excited to see this land. 🚀

If it'd be useful, I'm happy to:

  • Open an issue with this benchmark + the starlight-llms-txt companion‑output finding for a follow‑up.
  • Help spec a cacheKey analogue for content collection / Starlight markdown routes (or test a prototype).
  • Run the same harness on other large sites to widen the signal.

cc @matthewp — thanks for picking this back up and shipping such a focused take on the design.

* return posts.map(post => ({
* params: { slug: post.slug },
* props: { post },
* cacheKey: post.updatedAt,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not show the newly added digest herre?

Suggested change
* cacheKey: post.updatedAt,
* cacheKey: post.digest,
@matthewp

matthewp commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@IEvangelist Glad to hear that you have seen improvements! Your site is one of the ones I was thinking about when designing this. We definitely need to make it so that those 13k Starlight pages also get cached.


Actually I'm pretty sure that Starlight does use getStaticPaths. It doesn't currently use cacheKey however, that would need to be added/supported. Could you try patching your local version to use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs pr pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release

3 participants