Skip to content

Commit

Permalink
Merge branch 'main' into sync-2390627c
Browse files Browse the repository at this point in the history
  • Loading branch information
harshilparmar authored Oct 1, 2023
2 parents 577642e + 38d7541 commit 6385e99
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/content/reference/react/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ The optimization of caching return values based on inputs is known as [_memoizat
- React will invalidate the cache for all memoized functions for each server request.
- Each call to `cache` creates a new function. This means that calling `cache` with the same function multiple times will return different memoized functions that do not share the same cache.
- `cachedFn` will also cache errors. If `fn` throws an error for certain arguments, it will be cached, and the same error is re-thrown when `cachedFn` is called with those same arguments.

- `cache` is for use in [Server Components](/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023#react-server-components) only.


---

## Usage {/*usage*/}
Expand Down

0 comments on commit 6385e99

Please sign in to comment.