method
fresh?
v8.0.0 -
Show latest stable
- Class:
ActionDispatch::Http::Cache::Request
fresh?(response)public
Check response freshness (`Last-Modified` and `ETag`) against request `If-Modified-Since` and `If-None-Match` conditions. If both headers are supplied, based on configuration, either `ETag` is preferred over `Last-Modified` or both are considered equally. You can adjust the preference with `config.action_dispatch.strict_freshness`. Reference: http://tools.ietf.org/html/rfc7232#section-6