diff options
author | Yosuke Kabuto <bluewhale1982@gmail.com> | 2016-07-02 21:46:52 +0900 |
---|---|---|
committer | Yosuke Kabuto <bluewhale1982@gmail.com> | 2016-07-02 23:58:14 +0900 |
commit | b76f82d714e590c20370e72fa36fa574c4f17650 (patch) | |
tree | 09fad3494ff02f6705416338d083c46bfe4219bd /activesupport/lib/active_support/cache | |
parent | 49fe7c66874b7b92ff1587b35777a760ac75be9b (diff) | |
download | rails-b76f82d714e590c20370e72fa36fa574c4f17650.tar.gz rails-b76f82d714e590c20370e72fa36fa574c4f17650.tar.bz2 rails-b76f82d714e590c20370e72fa36fa574c4f17650.zip |
Update CHANGELOG.md for #25628 [ci skip]
Move new CHANGELOG entry top [ci skip]
Remove parameter "options = nil" for #clear
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/cache/strategy/local_cache.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 99c55b1aa4..3c31e633c4 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -27,7 +27,7 @@ module ActiveSupport # Deletes all items from the cache. In this case it deletes all the entries in the specified # file store directory except for .keep or .gitkeep. Be careful which directory is specified in your # config file when using +FileStore+ because everything in that directory will be deleted. - def clear(options = nil) + def clear root_dirs = exclude_from(cache_path, EXCLUDED_DIRS + GITKEEP_FILES) FileUtils.rm_r(root_dirs.collect{|f| File.join(cache_path, f)}) rescue Errno::ENOENT diff --git a/activesupport/lib/active_support/cache/strategy/local_cache.rb b/activesupport/lib/active_support/cache/strategy/local_cache.rb index 1c678dc2af..f86cebe548 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 yield end - def clear(options = nil) + def clear @data.clear end @@ -78,9 +78,9 @@ module ActiveSupport local_cache_key) end - def clear(options = nil) # :nodoc: + def clear # :nodoc: return super unless cache = local_cache - cache.clear(options) + cache.clear super end |