I have some function expensiveFunction() that takes several seconds to execute and returns a largish (5mb in JSON) array.
How can I schedule django to execute the function every x hours and then store the results somewhere so that when a user accesses a view, it returns those precalculated stored results?
Reading/writing to a textfile would have the overhead of reading in the file and then parsing JSON, and I feel like django sessions aren't suitable for this amount of data.
Using django 1.9.7 and python 3.4