aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/conditional_get.rb
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-09-07 13:24:45 +0530
committerGitHub <noreply@github.com>2016-09-07 13:24:45 +0530
commite703fc1f40c892771a0c3d81a03e7aa3561ef64a (patch)
treeaf6cd2ebbfb7dd0c2692bc0acef6d59a3270b538 /actionpack/lib/action_controller/metal/conditional_get.rb
parent06658f1d9db580ff570d783db30fd241a041e3b5 (diff)
parent0d1deb31eb2202acc8b2275163bb7440c9458de9 (diff)
downloadrails-e703fc1f40c892771a0c3d81a03e7aa3561ef64a.tar.gz
rails-e703fc1f40c892771a0c3d81a03e7aa3561ef64a.tar.bz2
rails-e703fc1f40c892771a0c3d81a03e7aa3561ef64a.zip
Merge pull request #26016 from nateberkopec/patch-1
Clarify expires_now documentation
Diffstat (limited to 'actionpack/lib/action_controller/metal/conditional_get.rb')
-rw-r--r--actionpack/lib/action_controller/metal/conditional_get.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/conditional_get.rb b/actionpack/lib/action_controller/metal/conditional_get.rb
index a26ebd2b24..89bf60a0bb 100644
--- a/actionpack/lib/action_controller/metal/conditional_get.rb
+++ b/actionpack/lib/action_controller/metal/conditional_get.rb
@@ -242,8 +242,9 @@ module ActionController
response.date = Time.now unless response.date?
end
- # Sets an HTTP 1.1 Cache-Control header of <tt>no-cache</tt> so no caching should
- # occur by the browser or intermediate caches (like caching proxy servers).
+ # Sets an HTTP 1.1 Cache-Control header of <tt>no-cache</tt>. This means the
+ # resource will be marked as stale, so clients must always revalidate.
+ # Intermediate/browser caches may still store the asset.
def expires_now
response.cache_control.replace(no_cache: true)
end