title: memoize to disk - python - persistent memoization
body: <p>Is there a way to memoize the output of a function to disk?</p>
  
  <p>I have a function</p>
  
  <pre><code>def getHtmlOfUrl(url):
      ... # expensive computation
  </code></pre>
  
  <p>and would like to do something like:</p>
  
  <pre><code>def getHtmlMemoized(url) = memoizeToFile(getHtmlOfUrl, "file.dat")
  </code></pre>
  
  <p>and then call getHtmlMemoized(url), so as to do the expensive computation only once for each url.</p>