Function
unstable_cache
(
callback: (...args: Inputs) => Promise<Output>,
key: string[],
options: { revalidate: number },
)
Source from the content-addressed store, hash-verified
| 3 | |
| 4 | // next_unstable_cache doesn't handle deduplication, so we wrap it in React's cache |
| 5 | export const unstable_cache = <Inputs extends unknown[], Output>( |
| 6 | callback: (...args: Inputs) => Promise<Output>, |
| 7 | key: string[], |
| 8 | options: { revalidate: number }, |
| 9 | ) => cache(next_unstable_cache(callback, key, options)); |
Tested by
no test coverage detected