class Puppet::HTTP::DNS::CacheEntry
Attributes
records[R]
resolution_time[R]
ttl[R]
Public Class Methods
new(records)
click to toggle source
# File lib/puppet/http/dns.rb 10 def initialize(records) 11 @records = records 12 @resolution_time = Time.now 13 @ttl = choose_lowest_ttl(records) 14 end
Public Instance Methods
choose_lowest_ttl(records)
click to toggle source
# File lib/puppet/http/dns.rb 16 def choose_lowest_ttl(records) 17 ttl = records.first.ttl 18 records.each do |rec| 19 if rec.ttl < ttl 20 ttl = rec.ttl 21 end 22 end 23 ttl 24 end