This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
Purge Cache does not appear to actually purge the cache, at least not within the same day #6665
Replies: 1 comment 1 reply
-
Having the same error at the moment, have you found anything? Not able to clear server responses either |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
I accidentally deployed two Storyden (Next.js based apps running on Vercel with backend APIs hosted on Fly.io) instances pointed to the same database, so all the posts/content from site B started rendering on site A. I fixed the issue a few days later. (just for my own reference, Site A = Makeroom, Site B = Tagwatch)
Both frontends for these sites are hosted on Vercel, and for a short time visitors to site A were seeing content from site B because of my mistake.
After fixing Site A to correctly point to Site A's database the API was now returning the correct content, however because Vercel and Next.js both have various levels of caching, I expected to see a mix of content for a while until these caches cleared up. And that was the case, when I loaded Site A I would have a 50% chance of seeing Site A's content or a 50% chance of seeing Site B's content which was cached from the period where I had the databases mixed up.
I assumed this would resolve itself after a few days but so far it's been over a week and if I load up Site A I still see a flash of content from Site B from the server-side render.
I've hit the purge cache button quite a few times over the week, but it does nothing.
My assumption was that I had made another mistake, so what I've done to confirm this is I've taken Site B entirely offline, there's no API or database running and I've confirmed the database for Site A does not contain any of the information I'm seeing.
Despite this, if I request the raw HTML directly from Site A by using
http get
orcurl
on the command line, I am seeing a server side initial render of HTML which contains Site B's content still, despite the API and database being entirely offline and the API that Site A uses just contains Site A's content - which is what the frontend render picks up on.So, all I can determine from this is that Purge Cache does not actually work and the initial HTML render still contains the index page from when I mixed up the databases and the HTML contains content from Site B's API.
As it's been over a week and I've purged this cache, disabled Cloudflare, made requests from different IPs/machines the only thing I can think of is that Vercel has cached the index page for this site and serves this on first render and has not re-rendered this page in over a week.
I'd love to know what strategies or tools I can use to fix this. Luckily these sites are currently in early stages but if this happened with a big client, I'd be seriously considering our larger sites moving off Vercel without a clear way to resolve issues like this.
Beta Was this translation helpful? Give feedback.
All reactions