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(
  pathname.value,
  () => queryContent(pathname.value).findOne(),
  {
    dedupe: 'defer',
    getCachedData(key) {
      return (
        nuxtApp.static.data[key] ||
        nuxtApp.payload.data[key]
      );
    },
  }
);

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