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' return } export default async function Page() { await connection() return ( <>

index page

Loading...

}>
Loading...

}>
) }