Method: ActiveSupport::Cache::FileStore#delete_matched

Defined in:
lib/gems/activesupport-2.2.2/lib/active_support/cache/file_store.rb

#delete_matched(matcher, options = nil) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/gems/activesupport-2.2.2/lib/active_support/cache/file_store.rb', line 32

def delete_matched(matcher, options = nil)
  super
  search_dir(@cache_path) do |f|
    if f =~ matcher
      begin
        File.delete(f)
      rescue SystemCallError => e
        # If there's no cache, then there's nothing to complain about
      end
    end
  end
end