RequestCache · Next.js server API
type RequestCache = <T>(factory) => () => T;Minimal shape of React’s cache function needed by the adapter.
Passing it in keeps React out of di-craft’s dependency graph while still letting React/Next own the current request cache.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
|
|
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
() => |
Returns
Section titled “Returns”() => T
Example
Section titled “Example”import { cache } from "react";
createNextDi({ cache, providers });