import { cacheLife, cacheTag } from 'next/cache'
export async function getCachedRandom() {
'use cache'
return Math.random()
}
export async function getCachedRandomWithTag(tag) {
'use cache'
cacheTag(tag)
return Math.random()
}
export async function getCachedRandomWithCacheLife(n = 1) {
'use cache'
cacheLife('weeks')
return String(Math.ceil(Math.random() * n))
}
export async function getCachedRandomWithHandler() {
'use cache: default'
return Math.random()
}