mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #33782 from mikhailov/patch-1
Update documentation to ActionController::ConditionalGet
This commit is contained in:
commit
bd932f5d22
1 changed files with 6 additions and 0 deletions
|
@ -230,6 +230,12 @@ module ActionController
|
||||||
# This method will overwrite an existing Cache-Control header.
|
# This method will overwrite an existing Cache-Control header.
|
||||||
# See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities.
|
# See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities.
|
||||||
#
|
#
|
||||||
|
# HTTP Cache-Control Extensions for Stale Content. See https://tools.ietf.org/html/rfc5861
|
||||||
|
# It helps to cache an asset and serve it while is being revalidated and/or returning with an error.
|
||||||
|
#
|
||||||
|
# expires_in 3.hours, public: true, stale_while_revalidate: 60.seconds
|
||||||
|
# expires_in 3.hours, public: true, stale_while_revalidate: 60.seconds, stale_if_error: 5.minutes
|
||||||
|
#
|
||||||
# The method will also ensure an HTTP Date header for client compatibility.
|
# The method will also ensure an HTTP Date header for client compatibility.
|
||||||
def expires_in(seconds, options = {})
|
def expires_in(seconds, options = {})
|
||||||
response.cache_control.merge!(
|
response.cache_control.merge!(
|
||||||
|
|
Loading…
Reference in a new issue