module Http::MaxAge
the default expiration time for get requests.
Public Class Methods
config()
click to toggle source
# File lib/extensions/http.rb, line 13 def self.config @config ||= (App.config["cache-max-age"] || {}).to_a end
for(url)
click to toggle source
# File lib/extensions/http.rb, line 17 def self.for(url) config.each do |pattern, max_age| return max_age if url.index(pattern) end nil end