Next.js Discord

Discord Forum

`revalidate` and Edge runtime

Answered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
According to Next.js documentation, the segment option revalidate is not compatible with Edge runtime.

Can someone explain the reason of this limitation? What is the technical constraint? Will it change in the future?

Since I cannot control revalidate on Edge, how does one specify the cache duration for a given page? From my understanding, next.revalidate can be used for fetch, is this the only way to do so?
Answered by joulev
They can’t be static (yet) because that’s a next limitation
View full answer

7 Replies

Dwarf CrocodileOP
Why couldn't they be static? My application renders the same whereas runtime = "edge" or not.
Since export const revalidate = TTL is no use when the runtime is edge, would setting next.revalidate enable data caching?
@Dwarf Crocodile Why couldn't they be static? My application renders the same whereas `runtime = "edge"` or not.
They can’t be static (yet) because that’s a next limitation
Answer
Dwarf CrocodileOP
Alright. Thanks for your help.