support refresh cache perodicly
The dns server of our data center is unstable, so i use dnscache to fix it, and it works most of the time, but when cache expired and dns server is unstable the same time, our service is interrupted until dns server works again.
One solution i think is add a refresh time option(less then ttl time), when cached item not expired but need refresh, resolve it async, update cache if resolve succussfully.
I already implemention this feature in my branch feature-keepalive, i will test it in production envirement these days.
Anybody have intresting on this feature can install it and give it a try:
npm install "tangxinfa/dnscache#feature-keepalive"
Hi,
Pull requests are most welcome.
Hi, I created a pull request: add keepalive option #17, please have a look, thanks:)