In general, you should use cache in Server Components to memoize work that can be shared across components.
cache is recommended for memoizing data fetches, unlike useMemo which should only be used for computations.
At this time, cache should only be used in Server Components and the cache will be invalidated across server requests.
In general, you should use cache in Server Components to memoize work that can be shared across components. cache is recommended for memoizing data fetches, unlike useMemo which should only be used for computations.
At this time, cache should only be used in Server Components and the cache will be invalidated across server requests.