Module: Http

Extended by:
Http
Included in:
Http
Defined in:
lib/extensions/http.rb

Overview

The Http module defines a

Http.get(url)

method.

Defined Under Namespace

Modules: MaxAge

Instance Method Summary collapse

Instance Method Details

#get(url, max_age = MaxAge.for(url)) ⇒ Object



25
26
27
28
29
30
31
32
# File 'lib/extensions/http.rb', line 25

def get(url, max_age = MaxAge.for(url))
  App.logger.benchmark("[GET] #{url}", :minimum => 20) do 
    App.cached(url, max_age) do 
      App.logger.debug "[GET] #{url}"
      get_(url) 
    end
  end
end