Unverified Commit a148d142 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Add note about skipping upstream cache during revalidation (#38014)

This adds a note about ensuring requests during a revalidation don't leverage an upstream cache as it will fail to pull fresh data to update the ISR cache with if configured. 

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Fixes: https://github.com/vercel/next.js/issues/35523#issuecomment-1154687543
x-ref: https://github.com/vercel/next.js/issues/35195Co-authored-by: 's avatarLee Robinson <9113740+leerob@users.noreply.github.com>
parent f4fb3e03
......@@ -88,6 +88,8 @@ When a request is made to a page that was pre-rendered at build time, it will in
When a request is made to a path that hasn’t been generated, Next.js will server-render the page on the first request. Future requests will serve the static file from the cache. ISR on Vercel [persists the cache globally and handles rollbacks](https://vercel.com/docs/concepts/next.js/incremental-static-regeneration).
> Note: Check if your upstream data provider has caching enabled by default. You might need to disable (e.g. `useCdn: false`), otherwise a revalidation won't be able to pull fresh data to update the ISR cache. Caching can occur at a CDN (for an endpoint being requested) when it returns the `Cache-Control` header.
## On-demand Revalidation
If you set a `revalidate` time of `60`, all visitors will see the same generated version of your site for one minute. The only way to invalidate the cache is from someone visiting that page after the minute has passed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment