From d06a98b7d9d3a8717cbe42ad506a21dc48613149 Mon Sep 17 00:00:00 2001 From: Matt Stopa Date: Wed, 10 Jul 2013 00:02:21 -0600 Subject: Add documentation for #clear on certain Store classes [ci skip --- activesupport/lib/active_support/cache/file_store.rb | 1 + activesupport/lib/active_support/cache/memory_store.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index f93f325012..79fe84e6b6 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -30,6 +30,7 @@ module ActiveSupport FileUtils.rm_r(root_dirs.collect{|f| File.join(cache_path, f)}) end + # Premptively iterates through all stored keys and removes the ones which have expired. def cleanup(options = nil) options = merged_options(options) each_key(options) do |key| diff --git a/activesupport/lib/active_support/cache/memory_store.rb b/activesupport/lib/active_support/cache/memory_store.rb index 4d26fb7e42..e58b7be9f8 100644 --- a/activesupport/lib/active_support/cache/memory_store.rb +++ b/activesupport/lib/active_support/cache/memory_store.rb @@ -36,6 +36,7 @@ module ActiveSupport end end + # Premptively 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 -- cgit v1.2.3