Apt_cacher_ng_cookbook is a project mainly written in Ruby, it's free.
A Chef cookbook for apt-cacher-ng