The validTtl setting forcibly overwrites TTL inside the cacheinsert
function. However, this inadvertently overrides the TTL of hosts file
entries as well so that they may expire prematurely, causing resolving
failures later.
This PR changes so that validTtl will only be enabled after all
entries from hosts file are inserted.
entries from hosts files
See: https://github.com/Kong/kong/issues/7444 for bug report
The
validTtl
setting forcibly overwrites TTL inside thecacheinsert
function. However, this inadvertently overrides the TTL of hosts file entries as well so that they may expire prematurely, causing resolving failures later.This PR changes so that
validTtl
will only be enabled after all entries from hosts file are inserted.