unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

feat(netlify): use new `durable` cache-control directive for `isr` rule #2571

Closed serhalp closed 3 months ago

serhalp commented 3 months ago

๐Ÿ”— Linked issue

N/A - discussed on Discord

โ“ Type of change

๐Ÿ“š Description

This is a follow-up to https://github.com/unjs/nitro/pull/2406.

See https://docs.netlify.com/platform/caching/#durable-directive. (This link should go live a bit later today!)

With this change, responses from isr routes will be propagated to the global edge network rather than be local to the CDN node that rendered and served it. This will improve performance and reduce serverless function invocations, in various scenarios.

This won't immediately have any effect since we're gradually rolling out the feature on the platform, but by the time nitro v3 (and frameworks that use it, like nuxt v4) are released it should be fully rolled out.

๐Ÿ“ Checklist

pi0 commented 3 months ago

So you mind to rebase against v2 branch? ๐Ÿ™ (rebased to v2, main branch will get it too: 859de2d63bfd6d0670248d1348dbc5ef46a11bdc)