Additional fix to #4728.

This commit is contained in:
Qiang Xue
2014-08-16 22:25:55 -04:00
parent 109da0b76e
commit 45dbbc39f6
3 changed files with 18 additions and 12 deletions

View File

@ -107,12 +107,10 @@ Expensive ETag generation may defeat the purpose of using `HttpCache` and introd
since they need to be re-evaluated on every request. Try to find a simple expression that invalidates
the cache if the page content has been modified.
> Note: In compliance to [RFC 7232, section 2.4](http://tools.ietf.org/html/rfc7232#section-2.4),
> Note: In compliance to [RFC 7232](http://tools.ietf.org/html/rfc7232#section-2.4),
`HttpCache` will send out both `ETag` and `Last-Modified` headers if they are both configured.
However, in order to satisfy [section 3.3](http://tools.ietf.org/html/rfc7232#section-3.3) the
`If-None-Match` client header will always take precedence over `If-Modified-Since` during validation; meaning
latter one is going to be ignored if a `If-None-Match` header is present in the request.
And if the client sends both of the `If-None-Match` header and the `If-Modified-Since` header, only the former
will be respected.
## `Cache-Control` Header <a name="cache-control"></a>