Name cache files after the function being cached

This makes caching much simpler, and eliminates an intermediate table
that mapped cache-files names to the functions that we can cache.