instance method
cleanup
Ruby on Rails 8.0.4
Since v3.0.20Signature
cleanup(options = nil)
Preemptively iterates through all stored keys and removes the ones which have expired.
Parameters
-
optionsopt = nil
Source
# File activesupport/lib/active_support/cache/file_store.rb, line 40
def cleanup(options = nil)
options = merged_options(options)
search_dir(cache_path) do |fname|
entry = read_entry(fname, **options)
delete_entry(fname, **options) if entry && entry.expired?
end
end
Defined in activesupport/lib/active_support/cache/file_store.rb line 40
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::FileStore