github withastro/astro @astrojs/netlify@2.6.0

latest releases: astro@4.15.11, @astrojs/sitemap@3.2.0, astro@5.0.0-beta.3...
14 months ago

Minor Changes

  • #7975 f974c95a2 Thanks @lilnasy! - If you are using Netlify's On-demand Builders, you can now specify how long your pages should remain cached. By default, all pages will be rendered on first visit and reused on every subsequent visit until a redeploy. To set a custom revalidation time, call the runtime.setBuildersTtl() local in either your frontmatter or middleware.

    ---
    import Layout from '../components/Layout.astro';
    
    if (import.meta.env.PROD) {
      // revalidates every 45 seconds
      Astro.locals.runtime.setBuildersTtl(45);
    }
    ---
    
    <Layout title="Astro on Netlify">
      {new Date(Date.now())}
    </Layout>

Patch Changes

Don't miss a new astro release

NewReleases is sending notifications on new releases.