#Caching data during build?
2 messages · Page 1 of 1 (latest)
you can do the computation in a js/ts module and import it where its neede
2 messages · Page 1 of 1 (latest)
I have an expensive computation I want to make in a layout that's shared between multiple pages, but I don't want to have to redo it for each page. Can I store the result in a global variable or something and reuse it for each page that's built, or is context like that not retained?
you can do the computation in a js/ts module and import it where its neede