t3-code-android-nightly/.repos/alchemy-effect/examples/cloudflare-website-vinext/app/use-cache/cached-stamp.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

13 lines
403 B
TypeScript

import { cacheLife, cacheTag } from "next/cache";
/**
* Function-level `"use cache"` — Next.js 16's replacement for
* experimental PPR shells. vinext implements the directive; full
* `cacheComponents` / resume is still incomplete upstream.
*/
export async function readCachedStamp() {
"use cache";
cacheTag("demo-stamp");
cacheLife({ revalidate: 30 });
return new Date().toISOString();
}