When discussing problems encountered when using an
Apache's mod_proxy (via the ProxyPass directive) in
front of a 4Suite server, Jeremy wrote:
> In a nutshell, Apache 1.3.x proxy-cache doesn't work.
It seems to cache a
> 304 response (0-length) as a 200 in its cache.
>
> It might work if the first request through the proxy-
cache was not from a
> caching client (no If-Modified-Since header). Some
wierdness with the
> Expires header (or lack of) exists in the code as well.
>
> We might want to consider adding some way of
defining expiration within the
> 4Suite repository.
I replied:
I was giving some consideration to providing a way of
defining expiration times or even just last-modified dates
for dynamic content, but decided that it was not worth
pursuing, because 1. Apache doesn't send any such
info for the output of CGI or PHP scripts, 2. there are
several ways of calculating the dates, each with
advantages and disadvantages, so we'd probably have to
support them all, which is more work, 3. I don't hear
people clamoring for it, and 4. I don't think we should
add something if the main benefit is to work around a
broken or just relatively dumb proxy. Apache 2's proxy
is smarter; you can configure it to cache responses that
don't have lastmod or expiration headers (it doesn't do
this by default, though; check the mod_proxy docs).
Uche takes the position of wanting to empower the
server admins as much as possible. He'd like to at least
have the ability to enable the setting of expiration on
generated content. I don't disagree; I just don't see it as
being a priority. I'll file it as a feature request on
SourceForge.