import React, { Suspense } from 'react' import { revalidate } from './actions' import { connection } from 'next/server' async function Random({ cached }: { cached?: boolean }) { const data = await fetch( 'https://next-data-api-endpoint.vercel.app/api/random' ).then((res) => res.text()) return ( <>
now: {Date.now()}
{cached ? 'cached ' : ''}random: {data}
> ) } async function CachedRandom() { 'use cache' returnindex page