diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-25 23:34:53 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-25 23:39:34 +0200 |
commit | 9cafc28874a681082f9f7e1e445db91f195a25ae (patch) | |
tree | 6504cf5ab233e716173a416012f9e908764c9e9e /activesupport/lib/active_support/cache | |
parent | 7fd0a6de849606b5449c55e41151d556d14ef75d (diff) | |
download | rails-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')
3 files changed, 1 insertions, 37 deletions
diff --git a/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb b/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb deleted file mode 100644 index 7c7d1c4b00..0000000000 --- a/activesupport/lib/active_support/cache/compressed_mem_cache_store.rb +++ /dev/null @@ -1,13 +0,0 @@ -module ActiveSupport - module Cache - class CompressedMemCacheStore < MemCacheStore - def initialize(*args) - ActiveSupport::Deprecation.warn('ActiveSupport::Cache::CompressedMemCacheStore has been deprecated in favor of ActiveSupport::Cache::MemCacheStore(:compress => true).', caller) - addresses = args.dup - options = addresses.extract_options! - args = addresses + [options.merge(:compress => true)] - super(*args) - end - end - end -end 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 diff --git a/activesupport/lib/active_support/cache/synchronized_memory_store.rb b/activesupport/lib/active_support/cache/synchronized_memory_store.rb deleted file mode 100644 index 37caa6b6f1..0000000000 --- a/activesupport/lib/active_support/cache/synchronized_memory_store.rb +++ /dev/null @@ -1,11 +0,0 @@ -module ActiveSupport - module Cache - # Like MemoryStore, but thread-safe. - class SynchronizedMemoryStore < MemoryStore - def initialize(*args) - ActiveSupport::Deprecation.warn('ActiveSupport::Cache::SynchronizedMemoryStore has been deprecated in favor of ActiveSupport::Cache::MemoryStore.', caller) - super - end - end - end -end |