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
 9 def initialize(records)
10   @records = records
11   @resolution_time = Time.now
12   @ttl = choose_lowest_ttl(records)
13 end

Public Instance Methods

choose_lowest_ttl(records) click to toggle source
   # File lib/puppet/http/dns.rb
15 def choose_lowest_ttl(records)
16   ttl = records.first.ttl
17   records.each do |rec|
18     if rec.ttl < ttl
19       ttl = rec.ttl
20     end
21   end
22   ttl
23 end