Caching common data across pages at SSG build time #78846
Unanswered
nwatab
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I make a page with SSG in NextJS App router. At build, every page
/foods/[id]/page.tsx
accesses the common data on a disk. I want it to access the disk only ONCE during build, not each build of a page. I have code below. It does not cache across page builds as I expected. Does anyone know how to do it? Thanks.page.tsx
load-food-data.tsx
Beta Was this translation helpful? Give feedback.
All reactions