diff options
author | George Claghorn <george.claghorn@gmail.com> | 2017-10-08 17:40:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-08 17:40:39 -0400 |
commit | 1f0e4ebad22e597459613a82858569b66f7f0cf8 (patch) | |
tree | 869c0dd92b3709afcc29d56079f074400e4e425d /activesupport/lib | |
parent | f165628cdf9a6d857ea6eeca02ed6c950b250df5 (diff) | |
parent | e2dbfe5adac3438e3f8bbd2e2dce2ad39c91221b (diff) | |
download | rails-1f0e4ebad22e597459613a82858569b66f7f0cf8.tar.gz rails-1f0e4ebad22e597459613a82858569b66f7f0cf8.tar.bz2 rails-1f0e4ebad22e597459613a82858569b66f7f0cf8.zip |
Merge pull request #30789 from erichmachado/file-store-cache-cleanup-fix
Fixes ActiveSupport::Cache::FileStore#cleanup bug which prevented it from removing expired entries
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 28df2c066e..f98d343ccd 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -39,9 +39,8 @@ module ActiveSupport def cleanup(options = nil) options = merged_options(options) search_dir(cache_path) do |fname| - key = file_path_key(fname) - entry = read_entry(key, options) - delete_entry(key, options) if entry && entry.expired? + entry = read_entry(fname, options) + delete_entry(fname, options) if entry && entry.expired? end end |