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.rb | 7 +++++++ 1 file changed, 7 insertions(+) (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 25f9555388..a415686020 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -115,6 +115,13 @@ module ActiveSupport self end + def mute + previous_silence, @silence = defined?(@silence) && @silence, true + yield + ensure + @silence = previous_silence + end + # Fetches data from the cache, using the given key. If there is data in # the cache with the given key, then that data is returned. # -- cgit v1.2.3