Closed emdioh closed 5 years ago
@emdioh Looks pretty interesting. Was there a specific reason to use uint32 instead of uint? .. I am not sure if from memory perceptive it would be better. I hope that GoLang sort these memory thingies out at compilation time.
I used uint32 because it's what dns.RR_Header uses uint for the ttl and I saw no reason to keep casting back and forth. uint is at least 32 bit, so this change will not increase the memory usage.
@emdioh Thanks. I remembered that this is the data-structure but for some reason what is well understood to some is weird to others.
@looterz wdyt?
Sorry that took awhile, thanks for the PR.
I've changed the response cache to use the actual responses TTL for expiration. The Get() operation also updates the TTL field in the answer so that it is consistent with the expected expiration.