Class: ActiveSupport::Cache::FileStore

Inherits:
Object
  • Object
show all
Defined in:
lib/hobo/extensions/active_support/cache/file_store.rb

Instance Method Summary collapse

Instance Method Details

#hobo_read_matched(matcher, options = nil) ⇒ Object Also known as: read_matched



4
5
6
7
8
9
10
11
12
13
# File 'lib/hobo/extensions/active_support/cache/file_store.rb', line 4

def hobo_read_matched(matcher, options = nil)
  Enumerator.new do |y|
    options = merged_options(options)
    matcher = key_matcher(matcher, options)
    search_dir(cache_path) do |path|
      key = file_path_key(path)
      y << [key, read_entry(key, options)] if key.match(matcher)
    end
  end
end