NextJS 13.4 app router - unable to get the latest content

I can't see what I am doing wrong. I followed the instructions in the docs and can pull content once. Then if I make a change and publish it, I don't get the latest version.

I have to revoke the API key and start again.

Surely I'm missing something?

export async function generateMetadata() {
  const page = await client.getSingle("homepage");
  return {
    title: page.data.title,
    description: page.data.description,
  };
}

I too have given the app router the old “college try.” I found that the issue you’re speaking of is related to the new caching system involved with the app router. My “solution” was to use:

export const revalidate = 0

This is not ideal as I believe this essentially makes the page server rendered on every request.
Give it a shot and let me know how it goes!

Thanks! That's solved it. I spent waaaay too much time trying to figure it out

2 Likes

:loudspeaker: Hey everyone!

Check out our latest blog post with updates on the Next.js app router and Prismic integration.

Happy coding! :computer::rocket: