Re: Apache's CacheNegotiatedDocs?

From: Dancer <dancer@dont-contact.us>
Date: Mon, 16 Mar 1998 15:37:38 +1000

From: http://www.apache.org/docs/content-negotiation.html
(This isn't the reference I was thinking of, but there you go)

Note on Caching

When a cache stores a document, it associates it with the request URL.
The next time that URL is requested, the cache can use the stored
document, provided it is still
within date. But if the resource is subject to content negotiation at
the server, this would result in only the first requested variant being
cached, and subsequent cache hits
could return the wrong response. To prevent this, Apache normally marks
all responses that are returned after content negotiation as
non-cacheable by HTTP/1.0
clients. Apache also supports the HTTP/1.1 protocol features to allow
caching of negotiated responses.

For requests which come from a HTTP/1.0 compliant client (either a
browser or a cache), the directive CacheNegotiatedDocs can be used to
allow caching of
responses which were subject to negotiation. This directive can be given
in the server config or virtual host, and takes no arguments. It has no
effect on requests from
HTTP/1.1 clients.

Marc Slemko wrote:
>
> On Sat, 14 Mar 1998, Dancer wrote:
>
> > Henrik Nordstrom wrote:
> > >
> > > Dancer wrote:
> > > > If you fetch one version of a document under (say) content
> > > > negotiation, then another version fetched under content
> > > > negotiation will appear to have the same last-modified time,
> > > > regardless of reality. S'just how Apache does it.
> > >
> > > I assume that Apache sends Vary: headers when doing content-negotiation
> > > (it should, at least when there is more than possible object for the
> > > URL)?
> >
> > Apparently not. This was from the Apache FAQ.
>
> Erm... no. Please provide an exact citation for that in the FAQ since I'm
> sure not aware of it being there.
>
> Apache does send Vary: headers.
>
> The only thing that CacheNegotiatedDocs does is not set an expires header
> to indicate it expires right now. This is really obsolete with HTTP/1.1
> support and with 1.0 proxies that support more headers than the base 1.0
> spec includes.
>
> Example header w/o CacheNegotiatedDocs:
>
> HTTP/1.1 200 OK
> Date: Mon, 16 Mar 1998 05:31:09 GMT
> Server: Apache/1.3b6-dev
> Vary: accept-language
> Last-Modified: Mon, 16 Mar 1998 05:30:49 GMT
> ETag: "188d1-3-350cb909"
> Content-Length: 3
> Accept-Ranges: bytes
> Connection: close
> Content-Type: text/html
> Content-Language: en
> Expires: Mon, 16 Mar 1998 05:31:09 GMT
>
> and with:
>
> HTTP/1.1 200 OK
> Date: Mon, 16 Mar 1998 05:33:45 GMT
> Server: Apache/1.3b6-dev
> Vary: accept-language
> Last-Modified: Mon, 16 Mar 1998 05:30:49 GMT
> ETag: "188d1-3-350cb909"
> Content-Length: 3
> Accept-Ranges: bytes
> Connection: close
> Content-Type: text/html
> Content-Language: en
>
> (this is a request for foo.html with foo.html.en and foo.html.fr
> available)

-- 
Did you read the documentation AND the FAQ?
If not, I'll probably still answer your question, but my patience will
be limited, and you take the risk of sarcasm and ridicule.
Received on Sun Mar 15 1998 - 21:44:54 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:39:23 MST