Method: Html2rss::AutoSource::Channel#ttl

Defined in:
lib/html2rss/auto_source/channel.rb

#ttlObject


51
52
53
54
55
56
# File 'lib/html2rss/auto_source/channel.rb', line 51

def ttl
  ttl = headers['cache-control']&.match(/max-age=(\d+)/)&.[](1)
  return unless ttl

  ttl.to_i.fdiv(60).ceil
end