Class: Cassette::Cache::NullStore
- Inherits:
-
Object
- Object
- Cassette::Cache::NullStore
- Defined in:
- lib/cassette/cache/null_store.rb
Overview
You cache nothing, null store
This is a fallback class when Rails or ActiveSupport cache cannot be loaded
Instance Method Summary collapse
- #clear ⇒ Object
- #delete_matched(_key) ⇒ Object
- #fetch(_key, _options = {}, &block) ⇒ Object
- #increment(_key, _by = 1, _options = {}) ⇒ Object
- #read(_key, _options = {}) ⇒ Object
- #write(_key, _value, _options = {}) ⇒ Object
Instance Method Details
#clear ⇒ Object
10 11 |
# File 'lib/cassette/cache/null_store.rb', line 10 def clear end |
#delete_matched(_key) ⇒ Object
17 18 19 |
# File 'lib/cassette/cache/null_store.rb', line 17 def delete_matched(_key) true end |
#fetch(_key, _options = {}, &block) ⇒ Object
29 30 31 |
# File 'lib/cassette/cache/null_store.rb', line 29 def fetch(_key, = {}, &block) block.call end |
#increment(_key, _by = 1, _options = {}) ⇒ Object
25 26 27 |
# File 'lib/cassette/cache/null_store.rb', line 25 def increment(_key, _by = 1, = {}) 0 end |
#read(_key, _options = {}) ⇒ Object
13 14 15 |
# File 'lib/cassette/cache/null_store.rb', line 13 def read(_key, = {}) nil end |
#write(_key, _value, _options = {}) ⇒ Object
21 22 23 |
# File 'lib/cassette/cache/null_store.rb', line 21 def write(_key, _value, = {}) true end |