aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/conditional_get.rb
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2016-03-05 00:41:10 -0500
committerJean Boussier <jean.boussier@gmail.com>2016-03-05 00:41:10 -0500
commit3d6c124dc1e2911b45c23596e9f0e1d2d7ee615f (patch)
tree8777a4ff661241857d46b51f52ae05a83efa5986 /actionpack/lib/action_controller/metal/conditional_get.rb
parent225bd148232a970174736ab5448eca42a696670f (diff)
downloadrails-3d6c124dc1e2911b45c23596e9f0e1d2d7ee615f.tar.gz
rails-3d6c124dc1e2911b45c23596e9f0e1d2d7ee615f.tar.bz2
rails-3d6c124dc1e2911b45c23596e9f0e1d2d7ee615f.zip
Remove http_cache_forever's version parameter
Diffstat (limited to 'actionpack/lib/action_controller/metal/conditional_get.rb')
-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