what difference between request memorization and data cache on app router
Next.js comes with a very powerful caching feature. This article introduces the difference between Request Memorization and Data Cache, two of its features.
What is Request Memorization?
Request Memorization caches the results when the URL and options of a fetch are the same. Moreover, this cache is discarded with each rendering.
What is Data Cache?
Data Cache caches the fetch and its results remain persistent.
What is the Difference Between Them?
Image by Next.js Doc
First, Request Memorization only performs caching during rendering. . Second, Request Memorization can reduce access to CDNs and data sources, whereas data cache can only reduce access to data sources.