mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
17 lines
405 B
JavaScript
17 lines
405 B
JavaScript
import { connection } from 'next/server'
|
|
import { unstable_cache as cache } from 'next/cache'
|
|
|
|
const cachedConnection = cache(async () => connection())
|
|
|
|
export default async function Page(props) {
|
|
await cachedConnection()
|
|
return (
|
|
<div>
|
|
<section>
|
|
This example uses `connection()` inside `unstable_cache` which should
|
|
cause the build to fail
|
|
</section>
|
|
</div>
|
|
)
|
|
}
|