I have a summary query where all result of the calculation are showed. I store only the data and on every request a function calculates the result. My problems is this method causes waiting times. I would like to reduce it. The best thing I could do is to cache the results for 24 hours.
I can not store the results, because many of the variables has to be changed easily.
What would be the best practice to run php functions on mysql select query?