Class: ActiveSupport::Cache::DalliStore
- Inherits:
-
Object
- Object
- ActiveSupport::Cache::DalliStore
- Defined in:
- lib/dalli-store-extensions.rb
Constant Summary collapse
- @@key =
"delete_matched_support_key"
Instance Method Summary collapse
- #clear_with_match_support(options = nil) ⇒ Object
- #delete_entry_with_match_support(key, options) ⇒ Object
- #delete_matched(matcher, options = nil) ⇒ Object
- #keys ⇒ Object
- #write_entry_with_match_support(key, entry, options) ⇒ Object
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(=nil) keys.clear clear_without_match_support() 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, ) keys.delete key delete_entry_without_match_support(key, ) end |
#delete_matched(matcher, options = nil) ⇒ Object
26 27 28 29 30 |
# File 'lib/dalli-store-extensions.rb', line 26 def delete_matched(matcher, =nil) keys.each do |key| delete_entry(key, ) if key =~ matcher end end |
#keys ⇒ Object
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, ) keys.add(key) write_entry_without_match_support(key, entry, ) end |