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