aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-10-07 11:17:50 -0300
committerJosé Valim <jose.valim@gmail.com>2009-10-15 18:18:44 -0300
commitaf0d1fa8920793a95fae456d1f5debdc50287eb3 (patch)
treedfae586337161abfa8567bf085bdb2e68a070cc2 /activesupport/lib/active_support/cache
parent5d0f8abc003cc6edfdb471ada05754580725b353 (diff)
downloadrails-af0d1fa8920793a95fae456d1f5debdc50287eb3.tar.gz
rails-af0d1fa8920793a95fae456d1f5debdc50287eb3.tar.bz2
rails-af0d1fa8920793a95fae456d1f5debdc50287eb3.zip
Update Orchestra instrumentations and move part of logging to Orchestra.
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r--activesupport/lib/active_support/cache/mem_cache_store.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb
index 516af99ce9..bec9de86ed 100644
--- a/activesupport/lib/active_support/cache/mem_cache_store.rb
+++ b/activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -103,17 +103,20 @@ module ActiveSupport
end
def increment(key, amount = 1) # :nodoc:
- log("incrementing", key, amount)
+ response = instrument(:increment, key, :amount => amount) do
+ @data.incr(key, amount)
+ end
- response = @data.incr(key, amount)
response == Response::NOT_FOUND ? nil : response
rescue MemCache::MemCacheError
nil
end
def decrement(key, amount = 1) # :nodoc:
- log("decrement", key, amount)
- response = @data.decr(key, amount)
+ response = instrument(:decrement, key, :amount => amount) do
+ @data.decr(key, amount)
+ end
+
response == Response::NOT_FOUND ? nil : response
rescue MemCache::MemCacheError
nil