Based on the conversation at [1].
This caches the Perl site directory after we've installed IPC::Run.
After consulting with Christoph Berg and David Wheeler on the Discord,
I've set up the cache to key on the output of `perl -V`, so that we'll
rebuild it after any change to Perl underneath us.
I went back and forth on doing the bare minimum (just save off the
CPAN source+build caches, then run CPAN each time) vs the more
involved strategy presented here (don't use CPAN at all on a cache
hit). The simpler approach only saved us about half of the up-to-60s
installation delay, because I can't seem to get CPAN to skip the
installation if IPC::Run is already installed.
So this patch is more code, but it's a lot faster once the cache is
warm. (The cache is also much smaller, as a minor bonus, but it was
only ~3MB to start with.)
--Jacob
[1] https://postgr.es/m/CAOYmi%2BkyuJHC7NTJWbzLBX25QnCsMVDbYWmv5tveSveNUyBAUw%40mail.gmail.com