automating caching of python scripts