Skip to content

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 Parameter

T

Parameter Type

factory

() => T

() => T

import { cache } from "react";
createNextDi({ cache, providers });