Cache data in Nuxt Content

up Nuxt

Mastering Prose Components in Nuxt Content

// Grab and cache the Nuxt Content document this links to
const nuxtApp = useNuxtApp();
const { data: metadata } = await useAsyncData(
  () => queryContent(pathname.value).findOne(),
    dedupe: 'defer',
    getCachedData(key) {
      return ([key] ||[key]

As far as I understand, this is only to speed up the cache on build: Using shared data when generating pages - Daniel Roe