Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect DNS records' TTL for caching #1

Open
muety opened this issue Oct 2, 2021 · 0 comments
Open

Respect DNS records' TTL for caching #1

muety opened this issue Oct 2, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@muety
Copy link
Owner

muety commented Oct 2, 2021

https://stackoverflow.com/a/48997354/3112139

@muety muety added the enhancement New feature or request label Oct 2, 2021
@muety muety changed the title Cache DNS response according to TTL Respect DNS records' TTL for caching Oct 2, 2021
dmke added a commit to dmke/caddy-remote-host that referenced this issue Apr 22, 2024
This mocks net.LookupIP with a wrapper type. In future, this might
be easier to accomplish with the help of the standard library (see
discussion in golang/go#12503).

With muety#1 in the
pipeline, I might consider swapping the stdlib resolver with a
full fledged DNS client (github.com/miekg/dns), as the stdlib
resolver does not return TTL values.
@dmke dmke mentioned this issue Apr 22, 2024
dmke added a commit to dmke/caddy-remote-host that referenced this issue Apr 26, 2024
This mocks net.LookupIP with a wrapper type. In future, this might
be easier to accomplish with the help of the standard library (see
discussion in golang/go#12503).

With muety#1 in the pipeline, I might consider
swapping the stdlib resolver with a full fledged DNS client
(github.com/miekg/dns), as the stdlib resolver does not return
TTL values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant