-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dedicated cache rules for vercel
ISR and netlify
Builders
#946
Comments
vercel
(isr) and netlify
vercel
ISR and netlify
Builders
/cc @danielroe what do you think? |
I think they are more consistent with each other than it currently sounds. Netlify does support numeric I would certainly be up for enabling built-in caching layer as well as the platform features. I lean against adding platform-specific route rules at the nitro level though. It feels like it will bring in fragmentation. What about focusing instead on adding additional generic options or rules that we implement within platforms (for example |
I agree that a generic option would be much better (if possible). Even when supporting My idea about having platform flags, was to make it sound more familiar to end-users coming from Vercel or Netlify. We can ultimately use it as an alias and map those to built-in (maybe |
Ah, so something like provider 'rule presets' or 'rule packs'? I worry only that it makes Nitro more opinionated and it becomes more difficult to have user provider add-ons, and removes some of the universality of how to implement. Feels like it might be better to document how each rule works with each provider, if different from default value. But may just be my innate conservativism. It's worth noting that |
Indeed nitro should be less opinionated and platform-independent. Mapping SWR to a different version for platforms made it confusing. Do you think we can have a proper caching spec that complies with the exact behavior of both Vercel ISR and Netlify Builders and introduce it as |
Mapping built-in
static
andswr
cache rules to platform special cache strategies currently introduced lots of confusion for users about how and where caching works with nitro. (should be everywhere, and consistent)The current mapping strategy is not exactly the same behavior. Netlify
swr
andstatic
are mapped tobuilders
does not specifies ttl and vercel maps to a strategy that supports expiration but we do not provide stale time which can be different).Apart from user confusion and not being able to map the strategies precisely, the built-in caching layer can be used universally, also for the vercel and netlify platforms. Allowing to cache in custom storage (could be useful particularly if we want to keep cache across deployments which is not possible currently by map)
I think we need to either introduce platform flags or a new cache flag that can be mapped to ISR/Builder which is not
swr
/static
and next major version of nitro, avoid this mapping.The text was updated successfully, but these errors were encountered: