[squid-users] Re: Squid config for only caching files from certain domain

From: Michael Cole <michaelcole_at_michaelcole.com>
Date: Wed, 22 Dec 2010 12:32:34 -0600

Hi,

I'd like to cache files locally, but only from a small list of
domains. This setup might be this:

http://wiki.squid-cache.org/ConfigExamples/Intercept/LinuxLocalhost

I haven't found a way to cache only certain requests (e.g.
http://ftp.drupal.org/*), but not cache any other traffic (web
development isn't improved with caching).

How does squid know when the cached version has expired? Some requests are:
 - http://ftp.drupal.org/files/projects/views-6.x-2.12.tar.gz
   - this file is always the same data
 - http://ftp.drupal.org/files/projects/views-7.x-3.x-dev.tar.gz
   - this file might change daily

Would this work? Is this how Squid should be used? Is there a better way?

Why? Without going into details, this is for a downloadable virtual
machine, with Ubuntu and PHP dev tools
(http://drupal.org/project/quickstart). An install script downloads
3mb+ of data each time it runs, and I'd like to cache those downloads.
I'm guessing about 70+ people download and use this vm, so caching
these install requests locally could eliminate thousands of redundant
requests.

Thanks,

Mike
Received on Wed Dec 22 2010 - 18:33:00 MST

This archive was generated by hypermail 2.2.0 : Thu Dec 23 2010 - 12:00:04 MST