I would do the "processing and calculation" by running a command every 4 hours and this should be called by a cron. That data is saved in a cache preferable to be Redis where is going to be read by the your application.
You can set the Redis expire to a certain time and if that passes you can leave the process to be done as it is done now just as a fallback .
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us