Next.js Discord

Discord Forum

Fetch caching not working when using openapi-generator-cli

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary LionOP
Hi folks! I have been working on converting our main application to app router and has been working great with the exception of the fetch caching. We use the openapi-generator-cli (https://openapi-generator.tech/) typescript-fetch generator to create a library to make requests to some of our externl services. This makes for a nice developer experience, but now it seems like I don't get any of the advantages of the fetch caching. Not seeing any logs, despite the generated code still calling the fetch thats globally available. Is there any way to explicitly import the fetch with the additional NextJS enhancements?

0 Replies