From af0d1fa8920793a95fae456d1f5debdc50287eb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 7 Oct 2009 11:17:50 -0300 Subject: Update Orchestra instrumentations and move part of logging to Orchestra. --- activesupport/lib/active_support/cache/mem_cache_store.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'activesupport/lib/active_support/cache') 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 -- cgit v1.2.3