mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Additional fix to #4728.
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user