16dcebe792
This PR stabilizes the previously introduced experimental config options for providing a custom cache handler (for both ISR as well as the Data Cache) and for disabling or configuring the in-memory cache size. The example usage would be as follows: ```js // next.config.js module.exports = { cacheHandler: require.resolve('./cache-handler.js'), cacheMaxMemorySize: 0 // disable default in-memory caching } ``` This PR also updates the documentation to better reflect how to use the custom cache handler when self-hosting. Further information will be added in a following PR that also includes a full example of a custom cache handler that implements `revalidateTag` as well as passing in custom cache tags. The API reference docs have been updated here, as well as a version history added. I also noticed that we currently have two duplicated versions of the ISR docs in the Pages Router docs: both for rendering and for data fetching. Data Fetching is the correct location for this page. There were no other references to the rendering version in the docs, so that must have been an accident. I'll need to a get a redirect going for that regardless. Tests have been updated for `cacheHandler` and I added a new test for `cacheMaxMemorySize`. --------- Co-authored-by: Jiachi Liu <inbox@huozhi.im> |
||
---|---|---|
.. | ||
01-getting-started | ||
02-app | ||
03-pages | ||
04-architecture | ||
05-community | ||
index.mdx |