nitro icon indicating copy to clipboard operation
nitro copied to clipboard

prepopulate cache during prerendering

Open pi0 opened this issue 2 years ago • 2 comments

Context: https://github.com/nuxt/nuxt/issues/24828

The idea is to prerender some routes but instead of writing them directly to output/public as static HTML files, use it to repopulate cache and use bundled storage to ship it to production. This way they can be updated on demand in production (something kinda similar to Vercel's ISR)

pi0 avatar Dec 21 '23 16:12 pi0

Not sure if it's any help, but Vercel has the concept of fallback static files: https://vercel.com/docs/build-output-api/v3/primitives#fallback-static-file

A Prerender asset may also include a static "fallback" version that is generated at build-time. The fallback file will be served by Vercel while there is not yet a cached version that was generated during runtime.

When the fallback file is served, the Serverless Function will also be invoked "out-of-band" to re-generate a new version of the asset that will be cached and served for future HTTP requests.

maximilliangeorge avatar Mar 11 '24 23:03 maximilliangeorge

I'm interested in this as well

tux2nicolae avatar Mar 24 '24 20:03 tux2nicolae