mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
We’re updating the SWC transform to [track](https://nextjs.org/telemetry) how the "use cache" directive is used during builds. Each use of "use cache" is counted based on the handler it’s linked to. By default, "use cache" counts toward a feature called "useCache/default". If a custom handler is defined in the Next.js config (e.g., "custom"), then "use cache: custom" will count toward "useCache/custom". The build process will collect these counts and combine them across all source files and workers. This data is reported under the NEXT_BUILD_FEATURE_USAGE event, allowing us to filter by "useCache/*" to see how often each cache handler is used. *Only support webpack prod build for now. Closes NDX-683
6 lines
96 B
React
6 lines
96 B
React
'use cache'
|
|
|
|
export default async function Page() {
|
|
return <h1>Hello from cached page!</h1>
|
|
}
|