Opened 6 years ago

Closed 6 years ago

#453 closed design (fixed)

Returning the freshest response

Reported by: mnot@… Owned by: draft-ietf-httpbis-p6-cache@…
Priority: normal Milestone: 23
Component: p6-cache Severity: In WG Last Call
Keywords: Cc:

Description

p6 currently says;

When more than one suitable response is stored, a cache must use the most recent response (as determined by the Date header field).

https://svn.tools.ietf.org/svn/wg/httpbis/draft-ietf-httpbis/latest/p6-cache.html#constructing.responses.from.caches

... which was sourced pretty directly from 2616:

A correct cache MUST respond to a request with the most up-to-date response held by the cache that is appropriate to the request

Interpreted strictly*, this means that if a cache has two fresh representations:

Content-Type: image/jpeg Date: Thu, 14 Feb 2013 03:08:09 GMT

Content-Type: image/png Date: Thu, 14 Feb 2013 03:08:08 GMT

and it gets a request with:

Accept: image/jpeg;q=0.1, image/png;q=1.0

then it'll return the JPEG because it's fresher, even though the client clearly prefers the PNG.

However that's not the whole story. To get to those multiple responses, the cache goes through the process of winnowing down the potentially matching stored responses, using the process described in <https://svn.tools.ietf.org/svn/wg/httpbis/draft-ietf-httpbis/latest/p6-cache.html#caching.negotiated.responses>.

That section says:

If multiple selected responses are available, the most recent response (as determined by the Date header field) is used; see Section 4.

which I put into p6 based upon the above.

So, I'm wondering if we should change that to something like:

""" If multiple selected responses are available, the cache will need to choose one to use. If a selecting header has a known mechanism for doing so (e.g., qvalues on Accept and similar request headers), it MAY be used to select one; otherwise, the most recent response (as determined by the Date header field) is used, as per Section 4. """

Thoughts?

  • "appropriately" doesn't give us enough leeway here on its own; see the context.

Change History (5)

comment:1 Changed 6 years ago by mnot@…

  • Milestone changed from unassigned to 23

Proposal:

If multiple selected responses are available, the cache will need to choose one to use. When a selecting header has a known mechanism for doing so (e.g., qvalues on Accept and similar request headers), that mechanism MAY be used to select preferred responses; of the remainder, the most recent response (as determined by the Date header field) is used, as per Section 4.

comment:2 Changed 6 years ago by mnot@…

From [2264]:

Allow selecting headers to be smart about selecting a negotiated representation; see #453

comment:3 Changed 6 years ago by mnot@…

  • Resolution set to incorporated
  • Status changed from new to closed

comment:4 Changed 6 years ago by mnot@…

  • Resolution incorporated deleted
  • Status changed from closed to reopened

comment:5 Changed 6 years ago by mnot@…

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.