class HTTP::Cache::Headers

def seconds_til_expires

Returns:
  • (Numeric) - number of seconds until the time in the
def seconds_til_expires
  get(HTTP::Headers::EXPIRES).
    map { |e| http_date_to_ttl(e) }.
    max
end