Class: Alephant::Broker::LoadStrategy::HTTP
- Inherits:
-
Object
- Object
- Alephant::Broker::LoadStrategy::HTTP
- Includes:
- Logger
- Defined in:
- lib/alephant/broker/load_strategy/http.rb
Defined Under Namespace
Classes: URL
Instance Method Summary collapse
-
#initialize(url_generator) ⇒ HTTP
constructor
A new instance of HTTP.
- #load(component_meta) ⇒ Object
Constructor Details
#initialize(url_generator) ⇒ HTTP
Returns a new instance of HTTP.
18 19 20 |
# File 'lib/alephant/broker/load_strategy/http.rb', line 18 def initialize(url_generator) @url_generator = url_generator end |
Instance Method Details
#load(component_meta) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/alephant/broker/load_strategy/http.rb', line 22 def load() fetch_object() rescue logger.metric "CacheMiss" cache.set(.component_key, content()) end |