import 'server-only' import { getPayload } from 'payload' import config from '@/payload.config' let cached: Awaited> | undefined export async function getPayloadInstance() { if (!cached) cached = await getPayload({ config }) return cached }