I’m currently re-installing Linux a lot of times, because I’m testing Skolelinux. Also building a custom CD (not successfully yet) required downloading a lot of packages. So instead of wating an hour or so every time I have now changed the configuration to allow caching of APT packages.

The relevant changes in the configuration file:

# Keep deb packages in cache for 30 days
refresh_pattern deb$ 43200 100% 43200
refresh_pattern Packages.gz$ 1440 100% 1440

maximum_object_size 102400 KB

cache_dir ufs /var/spool/squid 1000 16 256

The two refresh_pattern lines allow caching deb packages for 30 days and Packages.gz for one day. The maximum_object_size directive is necessary because by default objects larger than 4 megabytes are not cached. And finally I changed the cache_dir line to have a gigabyte spool instead of the 100 megabytes of before (Debian default configuration if I remember correctly).

I could also have used , but that was not readily available on the Linex version we currently use on that server.

Update November 21: Seems to have been a very good idea: Fetched 255MB in 36s (6989kB/s)