Skip to content
New issue

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

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

Already on GitHub? # to your account

Adds cache queries and setting to opt in to caching failure responses #82

Merged
merged 5 commits into from
Aug 1, 2020

Conversation

sipsorcery
Copy link
Contributor

Adds a new public method to allow the cache to be queried. The point of this is to allow an application to take different actions depending on whether a network lookup needs to be undertaken or not. See #80.

Adds a setting to choose whether lookup failures should be cached and if so for how long. The point of this is to allow applications to avoid high frequency lookups on failing queries.

…of this is to allow an application to take different actions depending on whether a network lookup needs to be undertaken or not. See MichaCo#80.

Adds a setting to choose whether lookup failures should be cached and if so for how long. The point of this is to allow applciations to avoid high frequency lookups on failing queries.
@MichaCo
Copy link
Owner

MichaCo commented Jul 30, 2020

Looks pretty good from first glance.

Are you going to add unit tests for the new settings and caching, too?

src/DnsClient/DnsQueryExtensions.cs Outdated Show resolved Hide resolved
src/DnsClient/LookupClient.cs Show resolved Hide resolved
@sipsorcery
Copy link
Contributor Author

Unit tests added.

Copy link
Owner

@MichaCo MichaCo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the unit tests, looks good.

src/DnsClient/DnsQueryExtensions.cs Outdated Show resolved Hide resolved
src/DnsClient/DnsQueryOptions.cs Outdated Show resolved Hide resolved
src/DnsClient/DnsQueryOptions.cs Outdated Show resolved Hide resolved
src/DnsClient/IDnsQuery.cs Outdated Show resolved Hide resolved
@MichaCo MichaCo merged commit 011013a into MichaCo:dev Aug 1, 2020
@MichaCo
Copy link
Owner

MichaCo commented Aug 1, 2020

Thank you very much for the PR /merged

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants