aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2018-09-05 08:04:27 -0400
committerGitHub <noreply@github.com>2018-09-05 08:04:27 -0400
commitbd932f5d2244185527c57d81ee7b6a7762560ab5 (patch)
tree9a3b4246abb8662104d2fb637142db9723628fa7 /actionpack/lib
parent5bd4a4c78b43f25245d3597876f541d84782ecc7 (diff)
parent8634b4688913772468b850922d908d2c7b5b6422 (diff)
downloadrails-bd932f5d2244185527c57d81ee7b6a7762560ab5.tar.gz
rails-bd932f5d2244185527c57d81ee7b6a7762560ab5.tar.bz2
rails-bd932f5d2244185527c57d81ee7b6a7762560ab5.zip
Merge pull request #33782 from mikhailov/patch-1
Update documentation to ActionController::ConditionalGet
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/conditional_get.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/conditional_get.rb b/actionpack/lib/action_controller/metal/conditional_get.rb
index 4be4557e2c..d6911ee2b5 100644
--- a/actionpack/lib/action_controller/metal/conditional_get.rb
+++ b/actionpack/lib/action_controller/metal/conditional_get.rb
@@ -230,6 +230,12 @@ module ActionController
# This method will overwrite an existing Cache-Control header.
# 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.
def expires_in(seconds, options = {})
response.cache_control.merge!(