Astro 7.0.0-beta.6 shipped on June 19, 2026, one day after beta.5 on June 18, and continues the 7.0 line's run of graduating every long-running experimental feature to stable. The headline of beta.6 is that route caching, which has been behind experimental.cache and experimental.routeRules since the 6.0 launch, is now a top-level stable API. Beta.5, the release right before it, changed the compressHTML default to 'jsx', which alters the rendered output of any project that relied on whitespace between inline elements being preserved. Both changes land on top of the beta.4 stabilization of the Sätteri Markdown pipeline as the default, covered in the Astro 7.0.0-beta.4 release notes earlier in the cycle.
The 7.0 line is on a fast burn toward stable. Beta.4 (June 15), beta.5 (June 18), beta.6 (June 19), and two alphas before them have graduated almost every experimental API 6.x shipped behind a flag, settled on Rust-native Markdown, switched the default whitespace handling to JSX-style, and now moved route caching to stable. The migration cost for any project on 6.x is real but mechanical: a config rename, a whitespace audit, and a check that your custom cache provider is one of the supported top-level options.
Route caching is now stable
Route caching was the last major experimental block left from 6.0. Beta.6 promotes it to a top-level config. The migration is one rename plus a provider choice:
// astro.config.mjs
import { defineConfig, memoryCache } from 'astro/config';
export default defineConfig({
cache: {
provider: memoryCache(),
},
routeRules: {
'/blog/[...path]': { maxAge: 300, swr: 60 },
},
});
In .astro pages you set directives with Astro.cache, and in API routes and middleware you use context.cache. Astro translates those directives into the appropriate headers or runtime behavior for the configured provider, so the same config works against memoryCache, fsCache, cloudflareKV, vercelISR, and the other providers that ship with the 7.0 line. The full provider matrix is documented in the route caching guide that ships with the release.
For prerendered pages the rules still apply at build time: the directives are encoded into the static HTML's Cache-Control headers, which means a CDN in front of your site will respect the same maxAge and swr you would have used for an on-demand rendered page. This is the part that is the most subtle change for projects that already had a CDN in front of prerendered output: the same routeRules config now controls both the on-demand runtime cache and the static-asset cache headers.
'jsx' is the new default for compressHTML
Beta.5 made 'jsx' the new default value for the compressHTML option. This is the same whitespace-stripping mode React, Solid, Preact, and the other JSX-based frameworks use: whitespace around elements is removed, and a single line of meaningful whitespace between two inline elements is preserved.
The difference matters in practice. In the legacy HTML-aware compression mode (the old compressHTML: true default), Astro kept a single space between two inline elements when there was a literal newline between them in the source. In the new 'jsx' default, that newline is stripped, which means a template like:
<p>
Hello <span>world</span>
</p>
renders the same as before, but a template like:
<p>
Click
<a href="/x">here</a>
for more
</p>
now renders without the line break between "Click", the link, and "for more". Anywhere you actually wanted that whitespace to be visible, write it explicitly with {' '}.
For projects that need to keep the old behavior while they audit, the migration is one line:
// astro.config.mjs
export default defineConfig({
compressHTML: true, // HTML-aware compression, the 6.x default
});
Set compressHTML: false to disable compression entirely, or compressHTML: 'jsx' to keep the new default explicitly. Beta.5 also fixes a handful of astro/hono and astro/fetch advanced routing bugs that have been landing across the 7.0 cycle, including one where the custom 500.astro page received an empty error prop when the error originated in middleware.
The wider 7.0 picture
Between beta.4 and beta.6, the 7.0 line has now stabilized or replaced almost every experimental feature that 6.x shipped behind a flag. Sätteri (Rust-native Markdown) is the default, advanced routing with Hono is stable, the custom logger is stable, the streaming rendering engine is stable, the JSX-style whitespace compression is the default, and route caching is now stable at the top level. The remaining 7.0 work before stable is mostly build tooling polish, the final @astrojs/markdown-satteri graduation, and the Vite 8 support that landed across the alpha and beta cycle.
What to do now
For projects on 6.x: upgrade to the latest 6.x patch and start the config migration early. Move cache and routeRules out of experimental, decide which provider you want, and run beta.6 against a staging branch. Audit your templates for the whitespace change: anywhere you rely on a newline between two inline elements producing visible whitespace, switch to {' '} or fall back to compressHTML: true until you have time to do the audit properly. The full list of breaking changes in the 7.0 line is in the CHANGELOG on the withastro/astro repo. Pin production to the 6.x line and treat beta.6 as the validation target.



