Re: [squid-users] Squid Doesn't Cache Some URLs, Does it Examine Content?

From: Ralph Corderoy <ralph@dont-contact.us>
Date: Sat, 20 May 2006 15:22:33 +0100

Hi Michael,

> Ralph Corderoy wrote:
> > Expires -
> > Cache-Control -
> > Last-Modified -
>
> These are the important headers which squid uses to determine if it
> can cache the object and how long for.

Oh yes, of course, I see now having compared to a *.gif from the same
site which does have a Last-Modified and an Etag.

> A javascript file is usually static so would normally be served with
> at least a Last-Modified header. If it is not then perhaps the .js
> files are being dynamically created with each request. From your
> squidclient output it looks like none of those headers are returned.

They're not. I've started talking to the site's webmasters about this
and them shipping Javascript as text/html.

> To get these cached you will need a refresh pattern that forces the
> file to be cached without these headers, i.e. where the minumum field
> is more than 0. A refresh pattern of: refresh_pattern \.js 10 50% 20
> would cache all .js file even those without the above headers for at
> least 10 minutes.

Ah, thanks. Yes, I've got that to work with three quite specific
patterns that target the areas holding Javascript on this site. That
cuts down the baggage on each page access quite considerably.

Thanks also to Henrik for also pointing this out and the other ircache
mirrors.

Cheers,

Ralph.
Received on Sat May 20 2006 - 08:22:41 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:02 MDT