aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/file_store.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-25 14:55:04 -0700
committerJosé Valim <jose.valim@gmail.com>2011-05-25 14:55:04 -0700
commit9b6791870bbe67f5c93cad0a676148b7cc83e697 (patch)
tree6504cf5ab233e716173a416012f9e908764c9e9e /activesupport/lib/active_support/cache/file_store.rb
parent7fd0a6de849606b5449c55e41151d556d14ef75d (diff)
parent9cafc28874a681082f9f7e1e445db91f195a25ae (diff)
downloadrails-9b6791870bbe67f5c93cad0a676148b7cc83e697.tar.gz
rails-9b6791870bbe67f5c93cad0a676148b7cc83e697.tar.bz2
rails-9b6791870bbe67f5c93cad0a676148b7cc83e697.zip
Merge pull request #1312 from joshk/remove_active_support_deprecations
Removed deprecated methods and related tests from ActiveSupport
Diffstat (limited to 'activesupport/lib/active_support/cache/file_store.rb')
-rw-r--r--activesupport/lib/active_support/cache/file_store.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb
index a1376ae52a..c4da04e532 100644
--- a/activesupport/lib/active_support/cache/file_store.rb
+++ b/activesupport/lib/active_support/cache/file_store.rb
@@ -77,19 +77,7 @@ module ActiveSupport
def read_entry(key, options)
file_name = key_file_path(key)
if File.exist?(file_name)
- entry = File.open(file_name) { |f| Marshal.load(f) }
- if entry && !entry.expired? && !entry.expires_in && !self.options[:expires_in]
- # Check for deprecated use of +:expires_in+ option from versions < 3.0
- deprecated_expires_in = options[:expires_in]
- if deprecated_expires_in
- ActiveSupport::Deprecation.warn('Setting :expires_in on read has been deprecated in favor of setting it on write.', caller)
- if entry.created_at + deprecated_expires_in.to_f <= Time.now.to_f
- delete_entry(key, options)
- entry = nil
- end
- end
- end
- entry
+ File.open(file_name) { |f| Marshal.load(f) }
end
rescue
nil