I do for myself, the site - the withdrawal of currencies from different banks, a calculator for convection. And so there were a few questions about how to do it.

Firstly, I take the data about the course from the API of another site, each time sending a request, what makes the loading of the site very long, how to optimize this process? Write data to the database every n minutes to update them, and then output to the user? Or the load can not be avoided?

    1 answer 1

    Yes, updating the cron / scheduler data will significantly unload the site. It is less expensive to perform one request once every five minutes than loading and parsing data for 200 visitors at a time. In addition, loading, waiting will take place in the background for the cron-process, visitors will be able to receive information immediately in a prepared form (for example, from a local database).