Packages

@astrojs/netlify

8.2.14 · 13 Nov 2026MIT71.2k / weekRepositoryHomepagenpmAtom feed

Your version

8.0.0

major22 Jun 2026Where it was published

8.2.14 is the newest release of 8.x.

In short

1 breaking1 new1 fixed1 internal

  • Breaking

    Upgrade to Vite v8

Security

2 advisories affect 8.0.0; 8.2.4 fixes them

Release note

Major Changes

  • Breaking

    Upgrade to Vite v8

Minor Changes

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](https://docs.netlify.com/platform/caching/#durable-directive) so cached responses are shared across all edge nodes, reducing function invocations.

```astro
---
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:

```js
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:

```ts
// 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

  • Triggers beta prereleases for packages that are still on alpha

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.