Closed atinux closed 2 years ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
vue-telescope-website | ✅ Ready (Inspect) | Visit Preview | Aug 13, 2022 at 1:16PM (UTC) |
Seems that we do have STALE answer 😊
One question @pi0. do you know why the cache-control sent back is not the same as the one defined in setHeader?
It seems to me vercel revalidates in the background since s-maxage is set to 1 and returns a header to invalidate response. Any specific reason you are not using h3 utility?
Because I don't remember the utility to use :sweat_smile:
It is handleCacheHeaders
(and should be auto importable with latest nitro) shall I push?
From what I see in https://github.com/unjs/h3/blob/main/src/utils/cache.ts
How would it produce s-maxage=1, stale-while-revalidate=3599
?
Updated to use handleCacheHeaders
@pi0, let me know if good enough to merge now :blush:
Ouppps, I need to handle to disable caching is the user is authenticated :sweat_smile:
Tested and seems to work well now, merging for more testing (it is still not officially released)
Open in CodeSandbox Web Editor | VS Code
Resolves #32