Re: [squid-users] Re: cache issues

From: Maoz <maozza_at_gmail.com>
Date: Mon, 26 Jan 2009 23:15:36 +0200

Hi,

I tried this suggestion, but the dynamic content still not cached.
the only way that works for me was by adding the Last-modified header.

For testing I added Last-modified header with the current time of the
http request to a single dynamic page, and it got cached.

It is not possible for me to add the Last-modified headers to all my
dynamic pages,
(we'll have to add this header to each and every page)

I notice that almost every site that work with dynamic content don't
have Last-modified and or Etag header, how come that I'm the only one
that run into this problem?
is there anyone out there that manage to cache dynamic content?
how? do you have Last-modified and or Etag header?

On Mon, 2009-01-26 at 21:03 +1300, Amos Jeffries wrote:
> Maoz wrote:
> > Hello Amos,
> >
> > Thank you for your answer!
> > I do not use expire header, my problem is that I only have Cache-Control
> > max-age headers on my dynamic pages (no Last-Modified) and I really need
> > to cache this pages according to the max-age headers.
> >
> > what will be the best way to do it?
>
> Squid caches by default for as long as it is permitted.
>
> If the variant identifiers are not present you will get users being
> given versions of the page they cannot display, or publicly sending
> versions with private information inside.
>
> >
> > Set header on apache to the system time environment variable, can it be
> > done?
> > Or is there a way to overcome this issue with the squid configuration,
> > and force the caching even though it have no Last-Modified headers?
> > is that other way without changing my application?
> >
> >
> > I tried the following configuring on squid but nothing work for me.
> >
> > refresh_pattern JHTML 60 75% 360 ignore-reload ignore-no-cache
> > ignore-no-store override-lastmod override-expire
> > acl JHTML urlpath_regex .*\.jhtml
>
> This ACL will only catch pages with lower-case file endings.
> And contains duplicate settings to what squid gets from the headers.
>
> > no_cache deny JHTML
>
> "no_cache" and "cache" mean exactly the same thing.
> The above line says "don't ever cache these pages for any reason".
> Removing it should be all you need for the pages to cache.
>
> > cache allow JHTML
> >
> > #Ignore force reload to send reqest to the server
> > refresh_pattern . 0 100% 86400 ignore-reload
> > refresh_pattern (\.jhtml|\.html) 0 75% 350 ignore-reload ignore-no-store
> > override-lastmod
>
> These patterns are around the wrong way.
> The top one of these two will match all requests and stop the following
> one happening.
>
> I believe the best config you want is just:
>
> acl JHTML urlpath_regex -i .*\.jhtml
> cache allow JHTML
>
>
> Amos
Received on Mon Jan 26 2009 - 21:15:55 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 27 2009 - 12:00:03 MST