maestrodev/puppet-wget — pull request #21 by gnustavo (2014-03-25 17:38:00+00:00)
Title: Implement a caching mechanism

This commit adds two attributes to the wget::fetch class: cache_dir and
cache_file. With them we implement a caching mechanism using the
timestamping (-N) and directory prefix (-P) wget options.

This intermediary cache can be very useful in a Vagrant environment in
which we map a directory of the VM (e.g. /var/cache/wget) to a directory
in the host (probably using the vagrant-cachier plugin). This way, even
after a snapshot rollback we do not have to download things again.