diff options
author | Matt Stopa <matthew.p.stopa@gmail.com> | 2013-07-10 00:02:21 -0600 |
---|---|---|
committer | Matt Stopa <matthew.p.stopa@gmail.com> | 2013-07-10 00:02:21 -0600 |
commit | d06a98b7d9d3a8717cbe42ad506a21dc48613149 (patch) | |
tree | 8e33829305a8af81227b58593ff5c05c075e65fb /activesupport/lib/active_support/cache | |
parent | b50bd49aa2d2d01ab05a58674557987386b13774 (diff) | |
download | rails-d06a98b7d9d3a8717cbe42ad506a21dc48613149.tar.gz rails-d06a98b7d9d3a8717cbe42ad506a21dc48613149.tar.bz2 rails-d06a98b7d9d3a8717cbe42ad506a21dc48613149.zip |
Add documentation for #clear on certain Store classes
[ci skip
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/cache/memory_store.rb | 1 |
2 files changed, 2 insertions, 0 deletions
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 |