Should the data from API be saved to the database or just call API everytime when data is needed for a website

Viewed 358

Please assume I have no experience in developing the structure of websites.

I am currently working on a website that displays data fetched from an API. (I use Django and python for the web app) I want to display the current Covid-19 data and analyze the trend in graphs and charts. I am able to grab the data from the API, but question is for a site like that needs an update on the numbers on a daily basis, what is the best practice for retrieving data. Should I be saving the api data to my database for easier access or should I just call the API everytime when the web page is visited (which is already a necessity due to the day to day update) and process data? (Performance wise or easily of processing data.)

I would appreciate if anyone would share their experience.

0 Answers
Related