rsnext/packages
Jimmy Lai 451a54cb2e
cache: add unstable_noStore API (#56930)
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(...);
}
```
2023-10-17 14:52:46 +00:00
..
create-next-app v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
eslint-config-next v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
eslint-plugin-next v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
font v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
next cache: add unstable_noStore API (#56930) 2023-10-17 14:52:46 +00:00
next-bundle-analyzer v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
next-codemod v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
next-env v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
next-mdx v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
next-plugin-storybook v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
next-polyfill-module v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
next-polyfill-nomodule v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
next-swc v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
react-dev-overlay v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
react-refresh-utils v13.5.6-canary.2 2023-10-17 13:26:58 +00:00
third-parties v13.5.6-canary.2 2023-10-17 13:26:58 +00:00