memorize the results of a multi-parameter function, using a weak cache.
the used arguments are cached weakly, meaning that if a non-primitive object obj was used as an argument,
then obj is not strongly bound to the memorized function's cache, meaning that if obj becomes inaccessible in all scopes,
then obj will become garbage collectible, which will then also clear the cache's reference to obj (and its memorized result).
memorize the results of a multi-parameter function, using a weak cache.
the used arguments are cached weakly, meaning that if a non-primitive object
objwas used as an argument, thenobjis not strongly bound to the memorized function's cache, meaning that ifobjbecomes inaccessible in all scopes, thenobjwill become garbage collectible, which will then also clear the cache's reference toobj(and its memorized result).