Unverified Commit 01ae44bb authored by Lee Robinson's avatar Lee Robinson Committed by GitHub

docs: fix a few ISR docs follow up (#69315)

- Code block was accidentally being hidden
- This should have been `no-store` to opt-out of caching
parent fea70f39
...@@ -92,7 +92,7 @@ If you are not using any [dynamic functions](/docs/app/building-your-application ...@@ -92,7 +92,7 @@ If you are not using any [dynamic functions](/docs/app/building-your-application
If you do _not_ want to cache the response from `fetch`, you can do the following: If you do _not_ want to cache the response from `fetch`, you can do the following:
```js ```js
let data = await fetch('https://api.vercel.app/blog', { cache: 'force-cache' }) let data = await fetch('https://api.vercel.app/blog', { cache: 'no-store' })
``` ```
### Fetching data on the server with an ORM or database ### Fetching data on the server with an ORM or database
......
...@@ -321,7 +321,7 @@ For a more precise method of revalidation, use `res.revalidate` to generate a ne ...@@ -321,7 +321,7 @@ For a more precise method of revalidation, use `res.revalidate` to generate a ne
For example, this API Route can be called at `/api/revalidate?secret=<token>` to revalidate a given blog post. Create a secret token only known by your Next.js app. This secret will be used to prevent unauthorized access to the revalidation API Route. For example, this API Route can be called at `/api/revalidate?secret=<token>` to revalidate a given blog post. Create a secret token only known by your Next.js app. This secret will be used to prevent unauthorized access to the revalidation API Route.
```ts filename="pages/api/revalidate.ts" switcher ```ts filename="pages/api/revalidate.ts"
import { NextApiRequest, NextApiResponse } from 'next' import { NextApiRequest, NextApiResponse } from 'next'
export default async function handler( export default async function handler(
......
...@@ -8,14 +8,13 @@ description: Examples of popular Next.js UI patterns and use cases. ...@@ -8,14 +8,13 @@ description: Examples of popular Next.js UI patterns and use cases.
### Data Fetching ### Data Fetching
- [Using the `fetch` API](/docs/app/building-your-application/data-fetching/fetching#fetch-api) - [Using the `fetch` API](/docs/app/building-your-application/data-fetching/fetching#fetching-data-on-the-server-with-the-fetch-api)
- [Using an ORM or database client](/docs/app/building-your-application/data-fetching/fetching#orms-and-database-clients) - [Using an ORM or database client](/docs/app/building-your-application/data-fetching/fetching#fetching-data-on-the-server-with-an-orm-or-database)
- Streaming data to a Client Component
### Revalidating Data ### Revalidating Data
- [Using ISR to revalidate data after a certain time](/docs/app/building-your-application/data-fetching/caching-and-revalidating#time-based-revalidation) - [Using ISR to revalidate data after a certain time](/docs/app/building-your-application/data-fetching/incremental-static-regeneration#time-based-revalidation)
- [Using ISR to revalidate data on-demand](/docs/app/building-your-application/data-fetching/caching-and-revalidating#on-demand-revalidation) - [Using ISR to revalidate data on-demand](/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath)
### Forms ### Forms
......
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