[squid-users] Squid to cache dynamic content for set period of time

From: Alex Davies <daviesalex@dont-contact.us>
Date: Tue, 27 Sep 2005 01:19:32 +0100

Dear All,

I am planning on using a squid server as a reverse proxy and have some
questions which I would be very grateful if you could answer.

The problem that I have is that Apache is currently serving a lot of
dynamic content (coldfusion) which hardly ever changes. What I want is
to install a fair amount of RAM and have something like squid cache
the output of the dynamic scripts so that it perhaps downloads them
every hour or so from Apache and then for the rest of the time serves
them from either RAM or a disk cache, depending on how popular they
are.

There are some scripts that are truly dynamic (search, and so on) so I
want it to be intelligent enough to pass these straight onto Apache -
either through a regular expressing I can define somewhere of URLs not
to cache or through some other method (ideally not getting the script
to set certain headers...).

Is this something that I can do with squid, and if so do you have any
hints how to do this based on experience? I am struggling to find a
guide to do this (particularly a way to override whatever headers
Apache is sending out with regard to expiry date or no-cache and so
on), so any help would be appreciated. Apart from setting cache_mem
high do you have any other recommendations for increasing/optimising
the use of the "hot" cache in RAM?

Finally, is it possible to give squid two Apache servers and ask it to
use one of them normally but if it fails a health check to switch to
another one (other than low TTLs and a DNS switch)?

With many thanks,

Alex Davies
Received on Mon Sep 26 2005 - 18:19:35 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Oct 01 2005 - 12:00:04 MDT