Unicache is a wrapper for PHP functions that caches return values. To cache a function, one simply calls unicache() with the function name as a string in the first argument, followed by the other arguments of the function. Unicache creates a separate cache file for each unique function call, uniqueness being determined by the function name and arguments.
Unicache can be downloaded here. Please read the included readme.txt before using.