451a54cb2e
This PR introduces a new API, `unstable_noStore`, which will allow users to declaratively opt out of caching anywhere during static generation in the same way that you can specify `cache: 'no-store'` on a fetch call in Next.js. An important caveat and difference from just calling `cookies()` to opt-out of static generation is that this won't opt you out when called from within `unstable_cache` and instead defers to the cache configuration to it. ``` import {unstable_noStore as noStore} from 'next/cache'; export default async function Component() { noStore(); const result = await db.query(...); } ``` |
||
---|---|---|
.. | ||
create-next-app | ||
eslint-config-next | ||
eslint-plugin-next | ||
font | ||
next | ||
next-bundle-analyzer | ||
next-codemod | ||
next-env | ||
next-mdx | ||
next-plugin-storybook | ||
next-polyfill-module | ||
next-polyfill-nomodule | ||
next-swc | ||
react-dev-overlay | ||
react-refresh-utils | ||
third-parties |