SeeringPhil
SeeringPhil
CDCloudflare Developers
Created by Nob on 4/12/2024 in #next-on-pages
```export default async function Page
There are other parameters necessary to make sure it's treated as a static page. If you add export const dynamicParams = false at the top of your page.tsx file, it should correctly detect it and prerender.
6 replies
CDCloudflare Developers
Created by James on 4/11/2024 in #next-on-pages
We have no knowledge of what happens
"it wouldn't really be possible for us to access your KV at build time", does that mean that we have no way to use data stored in KV to build static pages? Or were you specifically talking about the KV that is used for the Suspense cache? I get the bindings to KV, D1, R2 and etc are primarily for use with workers, but not being able to access data we'd store in one of them to build some of our static pages breaks a lot of use cases I thought were possible 🤔
5 replies
CDCloudflare Developers
Created by James on 4/11/2024 in #next-on-pages
We have no knowledge of what happens
Right. The cache he's referring to is indeed what happens when fetch requests are made, but if at build time the worker is not yet available that makes sense it won't work the same in CF.
5 replies
CDCloudflare Developers
Created by James on 4/11/2024 in #next-on-pages
We have no knowledge of what happens
Right, so my mental model wasn't quite right regarding that.. I expected that when setting things up so that KV handles the next.js automatic cache of data, it would be also used at build time. This comment by vercel's VP of developer experience made me think that build and server rendering would both have access to the cache. Do you know if that is a limitation /difference of Cloudflare's implementation of that caching behaviour? Or rather simply a misunderstanding on my part?
5 replies