Class: WebFetch::Storage
- Inherits:
-
Object
- Object
- WebFetch::Storage
- Defined in:
- lib/web_fetch/storage.rb
Overview
Rudimentary global storage for responses. The intention is that this will one day prescribe an interface to e.g. memcached
Class Method Summary collapse
Class Method Details
.delete(key) ⇒ Object
17 18 19 |
# File 'lib/web_fetch/storage.rb', line 17 def self.delete(key) @storage.delete(key) end |
.fetch(key) ⇒ Object
13 14 15 |
# File 'lib/web_fetch/storage.rb', line 13 def self.fetch(key) @storage.fetch(key, nil) end |
.store(key, obj) ⇒ Object
9 10 11 |
# File 'lib/web_fetch/storage.rb', line 9 def self.store(key, obj) @storage[key] = obj end |