Sometimes I have to destroy and reprovision a vagrant box several times. This causes a lot of redundant bandwidth – varnish downloads all those ubuntu packages over and over again. My initial idea was to set up a transparent squid proxy on the host machine, but this turned out to be quite a maintenance nightmare, so I abandoned it.

Luckily, there exists a vagrant plugin fixing my problem: vagrant-cachier mounts several cache directories like /var/cache/apt to the host machine, so they will be already available for a newly provisioned vagrant machine. As soon as my PR is being accepted, composer downloads will be cached the same way, too.

PS: I collected some interesting Vagrantfiles over at my pinboard profile.