1
0
Fork 0
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:
Eileen M. Uchitelle 2018-09-05 08:04:27 -04:00 committed by GitHub
commit bd932f5d22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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!(