aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/synchronized_memory_store.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-04-30 11:17:58 -0700
committerwycats <wycats@gmail.com>2010-04-30 11:17:58 -0700
commit0fe8827bf384cb99ab757236555c7af18793d515 (patch)
treea7ac2143c78964cad8ee87d9ff8a1c52abf61249 /activesupport/lib/active_support/cache/synchronized_memory_store.rb
parent91963e9e33eb5a28297323f1346aeb8b643e9d65 (diff)
parent6b559474fb7fae0160860fc62752da347af032b2 (diff)
downloadrails-0fe8827bf384cb99ab757236555c7af18793d515.tar.gz
rails-0fe8827bf384cb99ab757236555c7af18793d515.tar.bz2
rails-0fe8827bf384cb99ab757236555c7af18793d515.zip
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activesupport/lib/active_support/cache/synchronized_memory_store.rb')
-rw-r--r--activesupport/lib/active_support/cache/synchronized_memory_store.rb40
1 files changed, 2 insertions, 38 deletions
diff --git a/activesupport/lib/active_support/cache/synchronized_memory_store.rb b/activesupport/lib/active_support/cache/synchronized_memory_store.rb
index ea03a119c6..37caa6b6f1 100644
--- a/activesupport/lib/active_support/cache/synchronized_memory_store.rb
+++ b/activesupport/lib/active_support/cache/synchronized_memory_store.rb
@@ -2,45 +2,9 @@ module ActiveSupport
module Cache
# Like MemoryStore, but thread-safe.
class SynchronizedMemoryStore < MemoryStore
- def initialize
+ def initialize(*args)
+ ActiveSupport::Deprecation.warn('ActiveSupport::Cache::SynchronizedMemoryStore has been deprecated in favor of ActiveSupport::Cache::MemoryStore.', caller)
super
- @guard = Monitor.new
- end
-
- def fetch(key, options = {})
- @guard.synchronize { super }
- end
-
- def read(name, options = nil)
- @guard.synchronize { super }
- end
-
- def write(name, value, options = nil)
- @guard.synchronize { super }
- end
-
- def delete(name, options = nil)
- @guard.synchronize { super }
- end
-
- def delete_matched(matcher, options = nil)
- @guard.synchronize { super }
- end
-
- def exist?(name,options = nil)
- @guard.synchronize { super }
- end
-
- def increment(key, amount = 1)
- @guard.synchronize { super }
- end
-
- def decrement(key, amount = 1)
- @guard.synchronize { super }
- end
-
- def clear
- @guard.synchronize { super }
end
end
end