diff options
author | Murray Steele <muz@h-lame.com> | 2013-09-11 13:24:50 +0100 |
---|---|---|
committer | Murray Steele <muz@h-lame.com> | 2013-09-11 13:58:40 +0100 |
commit | accd4926cc072217bc98b82368d20fb8f79a8bca (patch) | |
tree | b963ea235014cc8143c732c4cfb801d13731f162 /activesupport/lib/active_support/cache | |
parent | db2c4abca6fa5814fdcf052587ae26522fdeac8f (diff) | |
download | rails-accd4926cc072217bc98b82368d20fb8f79a8bca.tar.gz rails-accd4926cc072217bc98b82368d20fb8f79a8bca.tar.bz2 rails-accd4926cc072217bc98b82368d20fb8f79a8bca.zip |
Fix FileStore#cleanup to no longer rely on missing each_key method
Diffstat (limited to 'activesupport/lib/active_support/cache')
-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 |