Memoize на диск — python — постоянное запоминание ⇐ Python
-
Гость
Memoize на диск — python — постоянное запоминание
Is there a way to memoize the output of a function to disk?
I have a function
def getHtmlOfUrl(url): ... # expensive computation and would like to do something like:
def getHtmlMemoized(url) = memoizeToFile(getHtmlOfUrl, "file.dat") and then call getHtmlMemoized(url), so as to do the expensive computation only once for each url.
Источник: https://stackoverflow.com/questions/164 ... emoization
Is there a way to memoize the output of a function to disk?
I have a function
def getHtmlOfUrl(url): ... # expensive computation and would like to do something like:
def getHtmlMemoized(url) = memoizeToFile(getHtmlOfUrl, "file.dat") and then call getHtmlMemoized(url), so as to do the expensive computation only once for each url.
Источник: https://stackoverflow.com/questions/164 ... emoization