Next.js Discord

Discord Forum

Next.js + Vercel + Prismic Cache failing

Unanswered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
When I run Next.js + Prismic build on my local machine, the caching works fine, but when I deploy to production, the caching doesn't work.

For example here's my local time to get prismic data: 3.2ms (avg <5ms)
And my time when I deploy to vercel: 2099ms (avg: 1000-2000ms)

White logs = vercel, black logs = local

6 Replies

West African LionOP
Here is my code to test the cache
And here's my prismic create client code
My guess is something with vercel's side of caching is broken, because it works fine locally, it feels like it's not caching at all and is getting fresh data each time
West African LionOP
Looks like it might be a prismic issuem I just removed the accessToken from the config and updated my api privacy to public in prismic and now I am getting sub 50ms
I am so fucking confused
Alligator mississippiensis
i experience this as well