lib/extensions/http.rb in radiospieler-0.3.4 vs lib/extensions/http.rb in radiospieler-0.3.5
- old
+ new
@@ -1,6 +1,7 @@
require 'net/http'
+require 'simple_cache'
# The Http module defines a
#
# Http.get(url)
#
@@ -22,10 +23,10 @@
end
end
def get(url, max_age = MaxAge.for(url))
App.logger.benchmark("[GET] #{url}", :minimum => 20) do
- App.cached(url, max_age) do
+ SimpleCache.cached(url, max_age) do
App.logger.debug "[GET] #{url}"
get_(url)
end
end
end