Skip to content

Commit

Permalink
Fix doc grammatical errors (#53672)
Browse files Browse the repository at this point in the history
### Improving Documentation

- Ran `pnpm prettier-fix`
  • Loading branch information
gaojude committed Aug 7, 2023
1 parent 3db5c16 commit de0ff6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ During rendering, if a [dynamic function](#dynamic-functions) or uncached data r
| -------------------- | ----------------- | ---------- |
| Statically Rendered | No | Cached |
| Dynamically Rendered | Yes | Cached |
| Dynamic Rendered | No | Not Cached |
| Dynamic Rendered | Yes | Not Cached |
| Dynamically Rendered | No | Not Cached |
| Dynamically Rendered | Yes | Not Cached |

From the table above, for a route to be fully static, all data must be cached. However, you can have a dynamically rendered route that uses both cached and uncached data fetches. This is useful when you have a page that mostly re-uses cached data, but has some uncached data. It allows you to opt into dynamic rendering without worrying about the performance impact of fetching all the data at request time.

Expand Down
4 changes: 2 additions & 2 deletions docs/02-app/01-building-your-application/04-caching/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const item = await getItem() // cache HIT
height="742"
/>

- While rendering a route, the first time a particular request is called, it's result will not be in memory and it'll be a cache `MISS`.
- While rendering a route, the first time a particular request is called, its result will not be in memory and it'll be a cache `MISS`.
- Therefore, the function will be executed, and the data will be fetched from the external source, and the result will be stored in memory.
- Subsequent function calls of the request in the same render pass will be a cache `HIT`, and the data will be returned from memory without executing the function.
- Once the route has been rendered and the rendering pass is complete, memory is "reset" and all request memoization entries are cleared.
Expand Down Expand Up @@ -341,7 +341,7 @@ Next.js has an in-memory client-side cache that stores the React Server Componen
height="1375"
/>

As users navigates between routes, Next.js caches visited route segments and [prefetches](/docs/app/building-your-application/routing/linking-and-navigating#1-prefetching) the routes the user is likely to navigate to (based on `<Link>` components in their viewport).
As users navigate between routes, Next.js caches visited route segments and [prefetches](/docs/app/building-your-application/routing/linking-and-navigating#1-prefetching) the routes the user is likely to navigate to (based on `<Link>` components in their viewport).

This results in an improved navigation experience for the user:

Expand Down

0 comments on commit de0ff6f

Please sign in to comment.