When you have expensive function calls in Python, a natural sounding solution is to use a persistent cache so you run once and then look up the results later. joblib is a standard tool for this, but there are some subtle gotchas and problems with it. I go through some of these, and show what the issues are. To address them, I wrote a little library called hashcache that builds on joblib and fixes some of these issues. You can find the code in pycse (https://github.com/jkitchin/pycse).
See the blog post at https://kitchingroup.cheme.cmu.edu/bl....