aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/file_store.rb
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2011-05-25 23:34:53 +0200
committerJosh Kalderimis <josh.kalderimis@gmail.com>2011-05-25 23:39:34 +0200
commit9cafc28874a681082f9f7e1e445db91f195a25ae (patch)
tree6504cf5ab233e716173a416012f9e908764c9e9e /activesupport/lib/active_support/cache/file_store.rb
parent7fd0a6de849606b5449c55e41151d556d14ef75d (diff)
downloadrails-9cafc28874a681082f9f7e1e445db91f195a25ae.tar.gz
rails-9cafc28874a681082f9f7e1e445db91f195a25ae.tar.bz2
rails-9cafc28874a681082f9f7e1e445db91f195a25ae.zip
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