Ric Lonsdale wrote:
Hi,

Is it possible to stop squid from caching anything for a short period of
time? I don't want to do this, but I'm being asked the question. Some guys
want to fire requests for websites via the squid server, to the internet at
set times during the day. They then want to fire exactly the same requests,
but they want an anti-virus / malicious code server (Finjan), sitting in a
DMZ, as the next hop after the requests have gone through squid and a
firewall.

They're doing this to see if the requests take significantly longer with the
extra layer of security in the way, so don't want squid to send back already
cached pages.
If it is possible to stop squid from caching new requests, does it also mean
it won't try to send existing cached pages back to the user?

I told them I could use squidclient to delete entries from the cache, but
they're talking about firing 1,000 URL's at it, which is obviously
unmanageable.

I don't want to delete the cache as it's 4.5gb.

Any help appreciated.

Thanks,
Ric

Squid 2.6 has a "cache" directive (http://www.squid-cache.org/Versions/v2/2.6/cfgman/cache.html, called "no_cache" in 2.5) that, combined with ACLs will prevent caching of requested pages. A side effect is that any matched objects that were previously stored in the cache will be removed...

If it's really going to be set times of the day, using a time based acl would be a good route to follow, but matching on source IP, user agent string, destination domains, etc. would all work.

As a last resort, setting "cache deny all" and reloading Squid would turn all caching off.

Chris

Reply via email to