Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
RFC7234: First-hand responses and age #23
Imagine a cache that has a stored response A with a Date value X. The
If X <= Y, then the situation is clear -- A is stale and the cache
What if X > Y? In other words, what if the cache receives a 200 OK
If I have to guess, I would use B if it does not have an Age header,
Is this a gray area, or did I miss a specific HTTPbis rule that resolves
The first bullet point in full is:
This is a bit different; it only takes effect when there are multiple stored responses, and implies that the MUST applies to those stored responses, not the one from the network. There's a bit of related background here.
So right now, it's "B wins."
At first blush, I tend to agree with Alex's guess; in particular, if an upstream cache serves something stale (e.g., due to SwR) and you have something that's newer in cache, intuitively you should use the newer one.
However, what if multiple entity-tags had been sent in
I think the possible resolutions here are to a) close with no action, or b) allow a fresher stored response to be used.
I'm leaning towards closing this with no action, or at most clarifying "When more than one suitable response is stored, a cache MUST use the most recent response" to read "When more than one suitable response is stored, a cache MUST use the most recent one."