You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to extend functionality so that /api/__api_party/${endpointId} routes can be cached in nitro by routeRules that we can define in nuxt.config.ts?
I don't have much knowledge about the inner workings of Nuxt and Nitro so maybe this is not possible to modules but it seems like this would be a great benefit.
Currently in my project I have a bunch for endpoints delivering some SEO content that I would like to cache for an extended period of time. Currently it doesn't seem possible to use the api-party composables fetch this data and have it cached by Nitro. This means I have to manually create endpoints in my server/api folder and use a mix of useFetch for cacheable endpoints and api-party composables for non-cachable endpoints which leads to a very confusing DX.
Additional information
Would you be willing to help implement this feature?
Can you think of other implementations of this feature?
Great idea! I guess that would be possible, technically. An alternative to route rules would be a runtimeCacheStorage key, similar to the caching strategy by Nuxt OG Image.
Unfortunately, the feature exceeds my current use-cases and time for implementation is rare. Maybe I'll look into it another day. Until then: PR happily welcome. 🙂
Describe the feature
Would it be possible to extend functionality so that
/api/__api_party/${endpointId}
routes can be cached in nitro by routeRules that we can define in nuxt.config.ts?I don't have much knowledge about the inner workings of Nuxt and Nitro so maybe this is not possible to modules but it seems like this would be a great benefit.
Currently in my project I have a bunch for endpoints delivering some SEO content that I would like to cache for an extended period of time. Currently it doesn't seem possible to use the api-party composables fetch this data and have it cached by Nitro. This means I have to manually create endpoints in my server/api folder and use a mix of useFetch for cacheable endpoints and api-party composables for non-cachable endpoints which leads to a very confusing DX.
Additional information
Final checks
The text was updated successfully, but these errors were encountered: