1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #26016 from nateberkopec/patch-1

Clarify expires_now documentation
This commit is contained in:
Vipul A M 2016-09-07 13:24:45 +05:30 committed by GitHub
commit e703fc1f40

View file

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