Problem when pushing new changes to github - old data shows up on site

When I enter data through prismic dashboard, all is displayed on the website. But if I make changes in my code (Next.js 13), push it to git repository - website is built with old data from prismic, probably some cached data. But in dashboard all is good, so when I post a small change there, everything is fixed on website, fresh data.
Here is an example. I have a 8 photos in prismic and on website. I make some changes in my code, push it to the repository. Website is rebuilt (vercel) with just 3 photos which were there in one phase of the website, but now should be 8. I log in into dashboard, all 8 photos are still there. I update something like alt of a photo, save, publish, and website is refreshed with correct data - 8 photos.
Have the same issue on 2 websites I did with prismic -> nextjs.

Any help would be really appreciated if I am doing something wrong.

Hi @tinktanksplit,

This sounds like it might be related to a problem we've been seeing with data caching in Next.js. You can check this thread to see if any of the solutions help:

We've also filed an issue on the Next.js GitHub, which you can see there. Feel free to upvote and subscribe to that issue.

Sam

1 Like