And Finally, when a new post is added, I’m running:
revalidateTag('public-posts');
Which doesn’t seem to do anything. It all works fine after 1 minute, when the cache expires on its own, but it doesn’t work when I try to clear the cache manually.
I did ISR with Astro on Vercel some time ago and they were using the concept of bypassToken, x-prerender-revalidate header. I’ve not come across Cache-Tag on Vercel docs. I can be wrong but it seems like applying concept from another CDN to Vercel.
I see that you are using the fetch next cache as well as the Edge network caching using the headers. The revalidateTag function will purge the fetch cache but not the Edge network cache.
This means that on the initial request the data is cached both in the application and at the Edge network. Calling the revalidateTag function before the second request and 60 seconds will purge the fetch cache but not the Network cache.
I don’t think the Cache-Tag header is used by Vercel.