diff options
Diffstat (limited to 'activesupport/lib/active_support/cache/memory_store.rb')
-rw-r--r-- | activesupport/lib/active_support/cache/memory_store.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/cache/memory_store.rb b/activesupport/lib/active_support/cache/memory_store.rb index 896c28ad8b..d7dc574f5b 100644 --- a/activesupport/lib/active_support/cache/memory_store.rb +++ b/activesupport/lib/active_support/cache/memory_store.rb @@ -1,4 +1,4 @@ -require 'monitor' +require "monitor" module ActiveSupport module Cache @@ -39,7 +39,7 @@ module ActiveSupport # Preemptively iterates through all stored keys and removes the ones which have expired. def cleanup(options = nil) options = merged_options(options) - instrument(:cleanup, :size => @data.size) do + instrument(:cleanup, size: @data.size) do keys = synchronize{ @data.keys } keys.each do |key| entry = @data[key] @@ -56,7 +56,7 @@ module ActiveSupport begin start_time = Time.now cleanup - instrument(:prune, target_size, :from => @cache_size) do + instrument(:prune, target_size, from: @cache_size) do keys = synchronize{ @key_access.keys.sort{|a,b| @key_access[a].to_f <=> @key_access[b].to_f} } keys.each do |key| delete_entry(key, options) |