4.3. Validation
节选理解
When a cache has one or more stored responses for a requested URI,
but cannot serve any of them (e.g., because they are not fresh, or
one cannot be selected; see Section 4.1), it can use the conditional
request mechanism [RFC7232] in the forwarded request to give the next
inbound server an opportunity to select a valid stored response to
use, updating the stored metadata in the process, or to replace the
stored response(s) with a new response. This process is known as
"validating" or "revalidating" the stored response.
Validation作用
updating the stored metadata in the process, or to replace the
stored response(s) with a new response
其中"replace the stored response(s) with a new response"应该理解为(RFC_GUSS):
- 收到200 response时,替换对应旧的
- 收到206时可以执行合并,合并以后替换旧的
Validation执行时机
rfc没有明确规定Validation的执行时机,执行时机可以由cache自由选择。