On Tue, 16 Nov 2004, Phil Endecott wrote:
> I have a relatively slow CGI application that I'd like to accelerate by
> caching its output. So far I've tried Apache's mod_disk_cache and Squid (I'm
> using the Debian version of 2.5.7) and neither works, I believe because they
> both consider the CGI output to be uncacheable. I'm hoping that someone on
> this list can offer some advice about how or if Squid can be made to work in
> this scenario.
What does the cacheability check engine say about the results?
And make sure you have not explicitly denied caching by the no_cache
directive. The recommended squid.conf for example does not cache URLs
with a ? in them even if the server returns caching information.
> Vary: Cookie
> Cache-Control: must-revalidate
> Etag: "hash-of-database-modification-time-and-any-cookie"
>
> I expect the subsequent requests to include an If-None-Match header, and I
> will then send either a 200 response with a new Etag if the page has changed
> or a 304 response with the same Etag if it has not changed.
Squid-2.5 does not support ETag, unfortunately (only Vary). There is a
patch at http://devel.squid-cache.org/ which adds ETag support to
Squid-2.5.
The "must-revalidate" may also be a bit troublesome, and with "Vary:
Cookie" it should not really be needed, should it?
Regards
Henrik
Received on Tue Nov 16 2004 - 16:52:09 MST
This archive was generated by hypermail pre-2.1.9 : Wed Dec 01 2004 - 12:00:01 MST