[squid-users] reverse squid cache configuration

From: Gromly Romain <gromly_at_gmail.com>
Date: Thu, 30 Jun 2011 19:48:28 +0200

Hello list,

I'm configuring a squid 2.6 (can't upgrade) as reverse proxy and i've
some questions about how cache works.

Here, how my architecture works:

AV Client > GET /file.zip (HTTP/1.1 with Cache-Control: max-age=0 and
sometimes, with also If-Modified-Since: date, it depends of the file)
=> Squid configured with refresh_pattern -i \.zip$ 1440 100% 1440 =>
Apache server with file.zip hosted with a classic configuration

If I try to get the file.zip with IE, it seems to work, I first have a
TCP_MISS/200 and then TCP_HIT/200. No request to the Apache server.

If I try to get the file.zip with the AV Client, I first have a
TCP_MISS/200 but then, I always have a TCP_REFRESH_HIT/200, so Squid
ask to the Apache server if the file is modified, Apache says 304.

I don't want to have this 304 all the time on my Apache but only when
the file is older than 1 day.

I think it could come from the cache-control: max-age=0 and I've tried
all different refresh_pattern configuration, particulary with
override-expires but I still have this TCP_REFRESH_HIT

Also, all my 404 ou 403 are relayed to the Apache, even if I've put
negative_ttl to 15 minutes...

So to resume for all that don't want to read: how not to have
TCP_REFRESH_HIT all the time and how not to relay 404 or 403 error to
the Apache?

If someone have an idea, please, do not hesitate!

Regards,
Received on Thu Jun 30 2011 - 17:48:35 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 01 2011 - 12:00:03 MDT