next.js/test/e2e/app-dir/app-static/pages/api/unstable-cache-node.js
unstable-cache-node.js15 lines252 B
import { unstable_cache } from 'next/cache'

export default async function handler(req, res) {
  const data = await unstable_cache(async () => {
    return {
      random: Math.random(),
    }
  })()

  res.json({
    now: Date.now(),
    data,
  })
}
Quest for Codev2.0.0
/
SIGN IN