in reply to Re: Re: Favourite modules April 2003
in thread Favourite modules April 2003
The function I memoize gets passed a file name, slurps the file, normalizes spaces and computes its MD5. So I don't think the content of the file is cached, as it is internal to the function.
I agree that using Memoize only saves me the cost of a hash (filename => MD5). I just like how easy it is to use it, and how it removes some extra code. As programers we are used to adding extra data structures and code to cache that kind of result, but really, using Memoize gets us closer to the initial algorithm for solving the problem. At least that's how I justify using it here ;--)