diff --git a/dns/cache.go b/dns/cache.go index 03be604..87aa2aa 100644 --- a/dns/cache.go +++ b/dns/cache.go @@ -5,8 +5,8 @@ import ( "time" ) -// HundredYears is one hundred years duration in seconds, used for none-expired items -const HundredYears = 100 * 365 * 24 * 3600 +// LongTTL is 50 years duration in seconds, used for none-expired items +const LongTTL = 50 * 365 * 24 * 3600 type item struct { value []byte diff --git a/dns/client.go b/dns/client.go index 7f633f9..3c61889 100644 --- a/dns/client.go +++ b/dns/client.go @@ -218,7 +218,7 @@ func (c *Client) AddRecord(record string) error { binary.Write(&buf, binary.BigEndian, uint16(len(b))) buf.Write(b) - c.cache.Put(getKey(m.Question), buf.Bytes(), HundredYears) + c.cache.Put(getKey(m.Question), buf.Bytes(), LongTTL) return nil }