Change8

astro@7.0.0-beta.6

Breaking Changes
📦 astroView on GitHub →
1 breaking4 features🐛 1 fixes🔧 7 symbols

Summary

Route caching is now stable, moving configuration options from `experimental` to top-level fields (`cache`, `routeRules`). This release also fixes build warnings related to Vite and Rolldown.

⚠️ Breaking Changes

  • The experimental configuration flags `experimental.cache` and `experimental.routeRules` have been removed. They are replaced by top-level configuration options `cache` and `routeRules`.

Migration Steps

  1. Move configuration from `experimental.cache` to the top-level `cache` option in `astro.config.mjs`.
  2. Move configuration from `experimental.routeRules` to the top-level `routeRules` option in `astro.config.mjs`.

✨ New Features

  • Route caching is now stable, providing a platform-agnostic way to cache responses from on-demand rendered pages and endpoints using standard HTTP caching semantics.
  • Introduced declarative route caching rules via the top-level `routeRules` configuration option.
  • Introduced top-level `cache` configuration option to specify the cache provider (e.g., `memoryCache()`).
  • Added `Astro.cache` for setting caching directives in .astro pages and `context.cache` for API routes and middleware.

🐛 Bug Fixes

  • Fixed Vite and Rolldown build warnings.

Affected Symbols