NUXT Crawer Static Generation Cache/Reuse API request data #9869
Unanswered
Mortalife
asked this question in
Questions (Nuxt 2)
Replies: 1 comment 1 reply
-
What you could do is to save the results to Vuex and then check Vuex for the existence of the data before calling the same endpoint again. If your API comes with a client library, there's also a chance there might be a caching functionality in it. Or you could use Or what I do, but is the opposite of what you want to do:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Is there any way to cache frequently used API calls on static site generation?
I have 2 endpoints which are hit for header/footer information and some language based calls which are present on every page but the generate command calls the endpoints again even though the data will not have changed.
I want to keep using the crawler rather than manually defining the routes and passing payload data. Likewise, I would prefer at this stage not to put a cache in front of my API.
Have I missed a configuration setting to make this possible? Any recommendations besides what I've outlined above?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions