Method: Bizside::Cache::FileStore#cleanup

Defined in:
lib/bizside/cache/file_store.rb

#cleanup(options = nil) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/bizside/cache/file_store.rb', line 24

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?
  end
end