Skip to content

Commit

Permalink
docs: fix a few ISR docs follow up (vercel#69315)
Browse files Browse the repository at this point in the history
- Code block was accidentally being hidden
- This should have been `no-store` to opt-out of caching
  • Loading branch information
leerob authored Aug 26, 2024
1 parent fea70f3 commit 01ae44b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```ts filename="pages/api/revalidate.ts" switcher
```ts filename="pages/api/revalidate.ts"
import { NextApiRequest, NextApiResponse } from 'next'

export default async function handler(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ description: Examples of popular Next.js UI patterns and use cases.

### Data Fetching

- [Using the `fetch` API](/docs/app/building-your-application/data-fetching/fetching#fetch-api)
- [Using an ORM or database client](/docs/app/building-your-application/data-fetching/fetching#orms-and-database-clients)
- Streaming data to a Client Component
- [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#fetching-data-on-the-server-with-an-orm-or-database)

### 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 on-demand](/docs/app/building-your-application/data-fetching/caching-and-revalidating#on-demand-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/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath)

### Forms

Expand Down

0 comments on commit 01ae44b

Please sign in to comment.