File size: 252 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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,
  })
}