Re: [squid-users] Caching URLs with a ? in them?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 13 Feb 2013 13:51:41 +1300

On 13/02/2013 10:48 a.m., Scott Baker wrote:
> I have a bunch of static content with appropriate Expires headers, but
> the URL contains a "?serial=123456" where the serial number is dynamic.
> Is squid smart enough to ignore the fact that the URL looks like a
> dynamic request,

It *is* a dynamic request. Look see ... the URL is constantly changing.

> and use the expire headers to see that it's indeed
> static/cacheable content?

Expires is relative to the URL. So if the URL changed its a *new* object
(MISS) with new Expiry details. Get the picture?

see http://wiki.squid-cache.org/ConfigExamples/DynamicContent for teh
configuration directives to change for cachign these responses. If you
have a new install of Squid-3.1 or later the default settings will cache
them.

However, once you have them cached, you will probably still see a lot of
MISS happening because the URL are changing. For best cache HIT rate you
need to look at why those serial exist at all in the URL. They are
breaking the cacheability for you and everyone else on the Internet. Do
you have control over the origin server generating those URLs? If you
could explain what the serial is for exactly perhapse we could point you
in the direction of fixing the object cacheability.

Amos
Received on Wed Feb 13 2013 - 00:51:54 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 13 2013 - 12:00:04 MST