diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-12 11:32:45 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-09-12 11:32:45 -0700 |
commit | cdc10c898d4865302740340eedec4f5f4ca76565 (patch) | |
tree | 3906eeeb6d002af30d0042f402ce924a34be2374 /activesupport/lib | |
parent | 0fbb797e5f667443e49f3c3a2b370eb00dc48951 (diff) | |
parent | accd4926cc072217bc98b82368d20fb8f79a8bca (diff) | |
download | rails-cdc10c898d4865302740340eedec4f5f4ca76565.tar.gz rails-cdc10c898d4865302740340eedec4f5f4ca76565.tar.bz2 rails-cdc10c898d4865302740340eedec4f5f4ca76565.zip |
Merge pull request #12196 from h-lame/fix-activesupport-cache-filestore-cleanup
Fix FileStore#cleanup to no longer rely on missing each_key method
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 472f23c1c5..10d39463ec 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -33,7 +33,8 @@ module ActiveSupport # 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| + search_dir(cache_path) do |fname| + key = file_path_key(fname) entry = read_entry(key, options) delete_entry(key, options) if entry && entry.expired? end |