From 987d501182971c1e6cdf8acb748635d14cf0c341 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 9 Oct 2009 15:03:18 +0100 Subject: Mute log info coming from the local_cache strategy --- activesupport/lib/active_support/cache/strategy/local_cache.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'activesupport/lib/active_support/cache/strategy') diff --git a/activesupport/lib/active_support/cache/strategy/local_cache.rb b/activesupport/lib/active_support/cache/strategy/local_cache.rb index 3b5fccc737..5f6fe22416 100644 --- a/activesupport/lib/active_support/cache/strategy/local_cache.rb +++ b/activesupport/lib/active_support/cache/strategy/local_cache.rb @@ -44,7 +44,7 @@ module ActiveSupport nil elsif value.nil? value = super - local_cache.write(key, value || NULL) if local_cache + local_cache.mute { local_cache.write(key, value || NULL) } if local_cache value.duplicable? ? value.dup : value else # forcing the value to be immutable @@ -54,12 +54,12 @@ module ActiveSupport def write(key, value, options = nil) value = value.to_s if respond_to?(:raw?) && raw?(options) - local_cache.write(key, value || NULL) if local_cache + local_cache.mute { local_cache.write(key, value || NULL) } if local_cache super end def delete(key, options = nil) - local_cache.write(key, NULL) if local_cache + local_cache.mute { local_cache.write(key, NULL) } if local_cache super end @@ -76,7 +76,7 @@ module ActiveSupport def increment(key, amount = 1) if value = super - local_cache.write(key, value.to_s) if local_cache + local_cache.mute { local_cache.write(key, value.to_s) } if local_cache value else nil @@ -85,7 +85,7 @@ module ActiveSupport def decrement(key, amount = 1) if value = super - local_cache.write(key, value.to_s) if local_cache + local_cache.mute { local_cache.write(key, value.to_s) } if local_cache value else nil -- cgit v1.2.3