Speed up your python code by caching