aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-03-05 16:52:48 -0300
committerRafael França <rafaelmfranca@gmail.com>2016-03-05 16:52:48 -0300
commit2fcd57b066e54f86470648cb13df5d0547b4f24a (patch)
treeb1f5d09945491701f3ffaad80df3ec74223676d8 /actionpack/lib/action_controller
parentdf890780f8461eb504d2607594ea47e68d0e0b2d (diff)
parent3d6c124dc1e2911b45c23596e9f0e1d2d7ee615f (diff)
downloadrails-2fcd57b066e54f86470648cb13df5d0547b4f24a.tar.gz
rails-2fcd57b066e54f86470648cb13df5d0547b4f24a.tar.bz2
rails-2fcd57b066e54f86470648cb13df5d0547b4f24a.zip
Merge pull request #24072 from byroot/remove-http-cache-forever-version
Remove http_cache_forever's version parameter
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/metal/conditional_get.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/conditional_get.rb b/actionpack/lib/action_controller/metal/conditional_get.rb
index e2535d024c..35befc05e1 100644
--- a/actionpack/lib/action_controller/metal/conditional_get.rb
+++ b/actionpack/lib/action_controller/metal/conditional_get.rb
@@ -222,12 +222,10 @@ module ActionController
# * +public+: By default, HTTP responses are private, cached only on the
# user's web browser. To allow proxies to cache the response, set +true+ to
# indicate that they can serve the cached response to all users.
- #
- # * +version+: the version passed as a key for the cache.
- def http_cache_forever(public: false, version: 'v1')
+ def http_cache_forever(public: false)
expires_in 100.years, public: public
- yield if stale?(etag: "#{version}-#{request.fullpath}",
+ yield if stale?(etag: request.fullpath,
last_modified: Time.new(2011, 1, 1).utc,
public: public)
end