Class: HTTParty::Cache::Store::Abstract
- Inherits:
-
Object
- Object
- HTTParty::Cache::Store::Abstract
- Defined in:
- lib/httparty/cache/store/abstract.rb
Overview
Cache store
Instance Attribute Summary collapse
- #options ⇒ Hash readonly
Instance Method Summary collapse
- #clear ⇒ Object
-
#delete(key) ⇒ Object
Nil.
- #get(key) ⇒ Response?
- #getset(key) { ... } ⇒ Object
- #key?(key) ⇒ Boolean
- #marshal_dump ⇒ Object
- #marshal_load(array) ⇒ Object
- #set(key, response) ⇒ Response
Instance Attribute Details
#options ⇒ Hash (readonly)
9 10 11 |
# File 'lib/httparty/cache/store/abstract.rb', line 9 def @options end |
Instance Method Details
#clear ⇒ Object
42 43 44 |
# File 'lib/httparty/cache/store/abstract.rb', line 42 def clear raise NotImplementedError end |
#delete(key) ⇒ Object
Returns nil.
26 27 28 |
# File 'lib/httparty/cache/store/abstract.rb', line 26 def delete(key) raise NotImplementedError end |
#get(key) ⇒ Response?
13 14 15 |
# File 'lib/httparty/cache/store/abstract.rb', line 13 def get(key) raise NotImplementedError end |
#getset(key) { ... } ⇒ Object
32 33 34 |
# File 'lib/httparty/cache/store/abstract.rb', line 32 def getset(key, &block) raise NotImplementedError end |
#key?(key) ⇒ Boolean
38 39 40 |
# File 'lib/httparty/cache/store/abstract.rb', line 38 def key?(key) raise NotImplementedError end |
#marshal_dump ⇒ Object
46 47 48 49 50 51 |
# File 'lib/httparty/cache/store/abstract.rb', line 46 def marshal_dump [ self.class.name, || {} ] end |
#marshal_load(array) ⇒ Object
53 54 55 |
# File 'lib/httparty/cache/store/abstract.rb', line 53 def marshal_load(array) Object.const_get(array.first).new(**array.last) end |
#set(key, response) ⇒ Response
20 21 22 |
# File 'lib/httparty/cache/store/abstract.rb', line 20 def set(key, response) raise NotImplementedError end |