Class: ActiveSupport::Cache::BlackholeStore
- Inherits:
-
Store
- Object
- Store
- ActiveSupport::Cache::BlackholeStore
- Defined in:
- lib/active_support/cache/blackhole_store.rb
Instance Method Summary collapse
- #clear ⇒ Object
- #delete(key, options = nil) ⇒ Object
- #delete_matched(matcher, options = nil) ⇒ Object
- #exist?(key, options = nil) ⇒ Boolean
-
#initialize ⇒ BlackholeStore
constructor
A new instance of BlackholeStore.
- #keys ⇒ Object
- #read(key, options = nil) ⇒ Object
- #write(key, value, options = nil) ⇒ Object
Constructor Details
#initialize ⇒ BlackholeStore
Returns a new instance of BlackholeStore.
5 6 7 8 9 |
# File 'lib/active_support/cache/blackhole_store.rb', line 5 def initialize super @data = {} end |
Instance Method Details
#clear ⇒ Object
33 34 |
# File 'lib/active_support/cache/blackhole_store.rb', line 33 def clear end |
#delete(key, options = nil) ⇒ Object
21 22 23 24 |
# File 'lib/active_support/cache/blackhole_store.rb', line 21 def delete(key, = nil) log("Delete", key, ) false end |
#delete_matched(matcher, options = nil) ⇒ Object
26 27 |
# File 'lib/active_support/cache/blackhole_store.rb', line 26 def delete_matched(matcher, = nil) end |
#exist?(key, options = nil) ⇒ Boolean
29 30 31 |
# File 'lib/active_support/cache/blackhole_store.rb', line 29 def exist?(key, = nil) false end |
#keys ⇒ Object
36 37 38 |
# File 'lib/active_support/cache/blackhole_store.rb', line 36 def keys @data.keys end |
#read(key, options = nil) ⇒ Object
11 12 13 14 |
# File 'lib/active_support/cache/blackhole_store.rb', line 11 def read(key, = nil) log("Read", key, ) nil end |
#write(key, value, options = nil) ⇒ Object
16 17 18 19 |
# File 'lib/active_support/cache/blackhole_store.rb', line 16 def write(key, value, = nil) log("Write", key, ) value end |