-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Question: Cache API Requests #3051
Comments
We think that's super important! Gatsby already does this. It fetches all data necessary at build-time. The diagram on Of course, your underlying data, whether it lives in a CMS or wherever, may change over time. If you control the data source, you can use webhooks to trigger a re-build whenever data changes. If you don't, you can trigger periodic rebuilds to pull in new data. |
@calcsam Ah, thank you. Cool, I will give it a try! |
Is there a way to cache external API requests and and make a call every XX minutes / hours / days?
Most APIs have a request limit so a better approach would be to fetch external data, store it in DB / file system and read from that. Via timer or cronjob the store should be updated.
The text was updated successfully, but these errors were encountered: