memoize to disk - python - persistent memoization

前端 未结 9 919
再見小時候
再見小時候 2020-12-24 05:34

Is there a way to memoize the output of a function to disk?

I have a function

def getHtmlOfUrl(url):
    ... # expensive computation
<
9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 06:21

    Check out joblib.Memory. It's a library for doing exactly that.

提交回复
热议问题