Hello there!
I have a Nuxt 4 project hosted on Vercel, and with wildcard subdomains.
I have a server/middleware.ts where I set these headers:
setResponseHeader(event, 'x-subdomain', subdomain)
setResponseHeader(event, 'Vary', 'header=x-subdomain')
setResponseHeader(event, 'Cache-Tag', `${subdomain},subdomain`)
setResponseHeader(event, 'Cache-Control', `public, max-age=0, s-maxage=86400, must-revalidate`)
So when I go to one of my subdomain (https://osso.bandotheque.fm), the headers show that I hit the Vercel Cache, and I can see my cache-tag header :
| Name | Value |
|---|---|
| age | 504 |
| cache-control | public, max-age=0, must-revalidate |
| cache-tag | osso,subdomain |
| server | Vercel |
| strict-transport-security | max-age=63072000 |
| vary | header=x-subdomain |
| x-powered-by | Nuxt |
| x-subdomain | osso |
| x-vercel-cache | HIT |
| x-vercel-id | cdg1::cdg1::cqkrw-1761300526220-342c16f891d9 |
If I try to purge all the cache through the Vercel interface, the x-vercel-cache show MISS, as excepted.
But if I try to purge the cache with a cache tag, like osso, It doesn’t do anything, and the x-vercel-cache is still on HIT:
I also tried osso,subomain or subdomain and it’s the same.
I tried with the Vercel api:
https://api.vercel.com/v1/edge-cache/invalidate-by-tags?projectIdOrName=prj_SzBUtNC3uMfV8wBAFJ9QmImUY7q5
Body:
{
"tags": ["osso"]
}
And nothing happens to…
As I’m missing something?
Thanks for your help!
–
A quick note from a non-expert user to the Vercel team:
Cache management is often very confusing. It’s not standardized across CDNs, the documentation is sparse, and it’s hard to know how things behave—especially for non-experts.
Because the Vercel DX is pretty amazing in many points, I thought using Vercel would make cache management easier, but I’m still facing the same issues with opacity, major limitations, and unpredictability. There’s no clear feedback showing the relationship between what you configure and what is actually served.
Even in the documentation, terms like Vercel Cache, Edge Cache, CDN Cache, and Data Cache are used interchangeably, and a non-expert can quickly get lost.
For example, with the x-vercel-cache header:
- Is it the CDN Cache or the Data Cache? (And is the CDN Cache the same as the Edge Cache?)
- Which cache is actually hit, and how?
- My
cache-tagappears in the headers, but is it actually taken into account by the cache?
A clearer explanation and better UX around caching, with visible feedback on how settings affect output, would be really helpful ![]()




