Skip to content

Commit

Permalink
docs: clarify caching of fetch based on comment (#68419)
Browse files Browse the repository at this point in the history
This code snippet comment was misleading, needs to be updated for
Next.js 15 behavior.

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
  • Loading branch information
leerob and delbaoliveira committed Aug 6, 2024
1 parent fe4797e commit 0faaf7a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ Caching is the process of storing data to reduce the number of requests made to

### `fetch` requests

Starting with Next.js 15, `fetch` requests are not cached by default.
`fetch` requests are not cached by default in Next.js 15.

To cache an individual `fetch` request, you can use the `cache: 'force-cache'` option:

```js
// 'force-cache' is the default, and can be omitted
fetch('https://...', { cache: 'force-cache' })
```

Expand Down

0 comments on commit 0faaf7a

Please sign in to comment.