Class: ActiveSupport::Cache::DalliStore

Inherits:
Object
  • Object
show all
Defined in:
lib/dalli-store-extensions.rb

Constant Summary collapse

@@key =
"delete_matched_support_key"

Instance Method Summary collapse

Instance Method Details

#clear_with_match_support(options = nil) ⇒ Object



14
15
16
17
# File 'lib/dalli-store-extensions.rb', line 14

def clear_with_match_support(options=nil)
  keys.clear
  clear_without_match_support(options)
end

#delete_entry_with_match_support(key, options) ⇒ Object



20
21
22
23
# File 'lib/dalli-store-extensions.rb', line 20

def delete_entry_with_match_support(key, options)
  keys.delete key
  delete_entry_without_match_support(key, options)
end

#delete_matched(matcher, options = nil) ⇒ Object



26
27
28
29
30
# File 'lib/dalli-store-extensions.rb', line 26

def delete_matched(matcher, options=nil)
  keys.each do |key|
    delete_entry(key, options) if key =~ matcher
  end 
end

#keysObject



32
33
34
# File 'lib/dalli-store-extensions.rb', line 32

def keys
  @keys ||= KeySet.new(self, @@key)
end

#write_entry_with_match_support(key, entry, options) ⇒ Object



8
9
10
11
# File 'lib/dalli-store-extensions.rb', line 8

def write_entry_with_match_support(key, entry, options)
  keys.add(key)
  write_entry_without_match_support(key, entry, options)
end