Class: APICache::NullStore
- Inherits:
-
AbstractStore
- Object
- AbstractStore
- APICache::NullStore
- Defined in:
- lib/api_cache/null_store.rb
Overview
A null store for environments where caching may be undesirable, such as testing.
Instance Method Summary collapse
- #created_at(key) ⇒ Object
- #delete(key) ⇒ Object
- #exists?(key) ⇒ Boolean
- #get(key) ⇒ Object
-
#initialize ⇒ NullStore
constructor
A new instance of NullStore.
- #set(key, value) ⇒ Object
Methods inherited from AbstractStore
Constructor Details
#initialize ⇒ NullStore
Returns a new instance of NullStore.
5 6 |
# File 'lib/api_cache/null_store.rb', line 5 def initialize end |
Instance Method Details
#created_at(key) ⇒ Object
23 24 25 |
# File 'lib/api_cache/null_store.rb', line 23 def created_at(key) nil end |
#delete(key) ⇒ Object
16 17 |
# File 'lib/api_cache/null_store.rb', line 16 def delete(key) end |
#exists?(key) ⇒ Boolean
19 20 21 |
# File 'lib/api_cache/null_store.rb', line 19 def exists?(key) false end |
#get(key) ⇒ Object
12 13 14 |
# File 'lib/api_cache/null_store.rb', line 12 def get(key) nil end |
#set(key, value) ⇒ Object
8 9 10 |
# File 'lib/api_cache/null_store.rb', line 8 def set(key, value) true end |