Hello Tom,
I've been working on a similar problem last week. I've read the squid
sources to understand how it works exactly and the answer is yes, if the
content needs authentication it will not be cached by default. You will
get MISS each time you request the same document.
If you configure squid to ignore authentication (refresh_pattern
ignore-auth option), it will cache the document but users won't need to
authenticate for the following requests. I guess this is not what you
want.
I had to configure the web server to add this new header in the
authenticated replies:
Cache-Control: max-age=0, must-revalidate, public
The public keywork allows squid to store the content of the reply.
The max-age=0 option forces squid to check if the stored document is up to
date on next requests. As a consequence it will also check authentication
and user access.
The must-revalidate keywork is here to force all caches (private and
public) to check content validity on next request (will check auth).
If you can't modify the web server replies, I don't know how to do this
without modifying squid source code.
Regards,
René
Le Lun 6 août 2007 11:04, Tom Dunstan a écrit :
> Hi All
>
>
> I've been unable to find an answer to this from Google or searching
> the web archives of the list, but perhaps someone here can help.
>
> Our project ingests feed data from upstream providers, and we're
> trying to use squid to cache that data for our various development systems,
> so as not to frag the feed providers with requests. Squid however seems
> rather reluctant to cache the content (X-Cache: MISS constantly). We
> presume that this is because the providers require basic authentication.
> There are no other cache/expiry related headers
> on the content.
>
> Does our diagnosis about authentication sound correct? If so, is there
> any way to configure squid to cache the authenticated content?
>
> Thanks in advance
>
>
> Tom
>
>
Received on Mon Aug 06 2007 - 03:40:38 MDT
This archive was generated by hypermail pre-2.1.9 : Sat Sep 01 2007 - 12:00:03 MDT