cd66493749
### What? We currently dedupe fetch requests, but if those fetch requests contain a `revalidate` time, when that window is expired all of those fetches will be invoked without deduping. ### Why? We track revalidations on the `staticGenerationStore` but we don't have a way to dedupe them, as it's currently just an array. When the (patched) fetch is invoked and catches a stale entry, it'll push each fetch onto the `pendingRevalidates` array which will later be invoked via `Promise.all`. ### How? This updates the shape of `pendingRevalidates` to be a map, that way we can reliably dedupe if we see a key that is already pending revalidation. Closes NEXT-1744 [slack x-ref](https://vercel.slack.com/archives/C03S8ED1DKM/p1700836529460289) |
||
---|---|---|
.. | ||
app | ||
app-fetch-deduping.test.ts |