Astro: @astrojs/[email protected] Release

Release date:
June 22, 2026
Previous version:
@astrojs/[email protected] (released June 13, 2026)
Magnitude:
1,870 Diff Delta
Contributors:
10 total committers
Data confidence:
Commits:

46 Commits in this Release

Ordered by the degree to which they evolved the repo in this version.

Authored June 15, 2026
Authored June 10, 2026
Authored June 15, 2026
Authored June 15, 2026
Authored June 11, 2026
Authored June 15, 2026
Authored June 10, 2026
Authored June 10, 2026
Authored June 22, 2026
Authored June 12, 2026
Authored June 17, 2026
Authored June 10, 2026

Top Contributors in @astrojs/[email protected]

matthewp
ascorbic
iseraph-dev
Princesseuh
astrobot-houston
adamchal
ljharb
alexanderdombroski
ArmandPhilippot
deining

Directory Browser for @astrojs/[email protected]

All files are compared to previous version, @astrojs/[email protected]. Click here to browse diffs between other versions.

Loading File Browser...

Release Notes Published

Major Changes

Minor Changes

  • #16335 9a53f77 Thanks @ascorbic! - Adds a CDN cache provider for Astro route caching on Netlify

    Setup

    Import cacheNetlify() from @astrojs/netlify/cache and set it as your cache provider:

    import { defineConfig } from 'astro/config';
    import netlify from '@astrojs/netlify';
    import { cacheNetlify } from '@astrojs/netlify/cache';
    
    export default defineConfig({
      adapter: netlify(),
      cache: {
        provider: cacheNetlify(),
      },
    });
    

    Caching responses

    Use Astro.cache.set() in your pages and API routes to cache responses on Netlify's edge network. The provider uses Netlify's durable cache so cached responses are shared across all edge nodes, reducing function invocations.

    ---
    Astro.cache.set({ maxAge: 300, tags: ['products'] });
    const data = await fetchProducts();
    ---
    
    <ProductList items={data} />
    

    You can also set cache rules for groups of routes in your config:

    cache: { provider: cacheNetlify() },
    routeRules: {
      '/products/[...slug]': { maxAge: 3600, tags: ['products'] },
      '/api/[...path]': { maxAge: 60, swr: 600 },
    },
    

    Invalidation

    Purge cached responses by tag or path from any API route or server endpoint:

    // src/pages/api/purge.ts
    export async function POST({ request, cache }) {
      await cache.invalidate({ tags: ['products'] });
      return new Response('Purged');
    }
    
    // Path-based invalidation
    await cache.invalidate({ path: '/products/123' });
    

    Both tag-based and path-based invalidation are supported.

Patch Changes