Skip to content
verdict:

Astro 7.0.0-beta.6

preview

note: no summary for this older release

We summarize recent releases. The original release notes for this version are below.

release-notesgithub.com/withastro/astro · 40 lines
  1. ### Minor Changes
  2. - [#17116](https://github.com/withastro/astro/pull/17116) [`f95e58e`](https://github.com/withastro/astro/commit/f95e58eaa6a6d7ac02f84193b485471f0cd14de6) Thanks [@ascorbic](https://github.com/ascorbic)! - Stabilizes route caching, removing the `experimental.cache` and `experimental.routeRules` flags and replacing them with the top-level `cache` and `routeRules` configuration options.
  3. Route caching, introduced experimentally in v6.0.0, is now stable. It gives you a platform-agnostic way to cache responses from [on-demand rendered](https://docs.astro.build/en/guides/on-demand-rendering/) pages and endpoints, based on standard HTTP caching semantics.
  4. Update your config to move `cache` and `routeRules` out of the `experimental` block:
  5. ```diff
  6. // astro.config.mjs
  7. import { defineConfig, memoryCache } from 'astro/config';
  8. export default defineConfig({
  9. - experimental: {
  10. - cache: {
  11. - provider: memoryCache(),
  12. - },
  13. - routeRules: {
  14. - '/blog/[...path]': { maxAge: 300, swr: 60 },
  15. - },
  16. - },
  17. + cache: {
  18. + provider: memoryCache(),
  19. + },
  20. + routeRules: {
  21. + '/blog/[...path]': { maxAge: 300, swr: 60 },
  22. + },
  23. });
  24. ```
  25. Set caching directives in your routes with `Astro.cache` (in `.astro` pages) or `context.cache` (in API routes and middleware), and Astro translates them into the appropriate headers or runtime behavior depending on your configured cache provider. You can also define cache rules for routes declaratively in your config using `routeRules`, without modifying route code.
  26. See the [route caching guide](https://docs.astro.build/en/guides/caching/) for more information.
  27. ### Patch Changes
  28. - [#17090](https://github.com/withastro/astro/pull/17090) [`3cf76c0`](https://github.com/withastro/astro/commit/3cf76c035eef5954637e78015be9c20d0129599a) Thanks [@matthewp](https://github.com/matthewp)! - Fixes Vite and Rolldown build warnings
  29. - Updated dependencies \[[`7e7ab87`](https://github.com/withastro/astro/commit/7e7ab8775f1c70e00e30db9d3c4796246eaf1c5f)]:
  30. - @astrojs/markdown-satteri@0.3.1-beta.2

view on githubimported 2026-09-28 via npm