From 6fbe9ef2ffb1858027130789246f3ae24a0a182f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 3 Jan 2010 20:39:42 +0100 Subject: Use namespaces in notifications. --- activesupport/lib/active_support/cache.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/cache.rb') diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index ad238c1d96..25314ffd43 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -247,13 +247,13 @@ module ActiveSupport expires_in || 0 end - def instrument(operation, key, options, &block) + def instrument(operation, key, options) log(operation, key, options) if self.class.instrument payload = { :key => key } payload.merge!(options) if options.is_a?(Hash) - ActiveSupport::Notifications.instrument(:"cache_#{operation}", payload, &block) + ActiveSupport::Notifications.instrument("activesupport.cache_#{operation}", payload){ yield } else yield end -- cgit v1.2.3 From 3990310a2bedd0dff5753e3e9b1282e686cff0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 4 Jan 2010 00:03:56 +0100 Subject: Use underscore in notification namespaces. --- activesupport/lib/active_support/cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/cache.rb') diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 25314ffd43..6360a4614e 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -253,7 +253,7 @@ module ActiveSupport if self.class.instrument payload = { :key => key } payload.merge!(options) if options.is_a?(Hash) - ActiveSupport::Notifications.instrument("activesupport.cache_#{operation}", payload){ yield } + ActiveSupport::Notifications.instrument("active_support.cache_#{operation}", payload){ yield } else yield end -- cgit v1.2.3