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

Configurable caching for negative results (NXDOMAIN) (#287) #330

Merged
merged 19 commits into from
Nov 6, 2021

Conversation

kwitsch
Copy link
Collaborator

@kwitsch kwitsch commented Nov 5, 2021

Changes:

  • added cache.cacheTimeNegative (time.Duration)
  • if not configured the default cache time stays at 30 min
  • if set to a value below zero caching of negative responses is disabled

closes #287

@codecov
Copy link

codecov bot commented Nov 5, 2021

Codecov Report

Merging #330 (d52a784) into development (f823db1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           development     #330   +/-   ##
============================================
  Coverage        96.26%   96.27%           
============================================
  Files               29       29           
  Lines             2198     2200    +2     
============================================
+ Hits              2116     2118    +2     
  Misses              53       53           
  Partials            29       29           
Impacted Files Coverage Δ
config/config.go 92.80% <ø> (ø)
resolver/caching_resolver.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f823db1...d52a784. Read the comment docs.

@kwitsch kwitsch changed the title #287 Code proposal for ticket #287 Nov 5, 2021
@kwitsch kwitsch marked this pull request as ready for review November 5, 2021 22:50
@0xERR0R 0xERR0R changed the title Code proposal for ticket #287 Configurable caching for negative results (NXDOMAIN) (#287) Nov 6, 2021
.dockerignore Outdated Show resolved Hide resolved
.gitignore Outdated
@@ -13,3 +13,4 @@ todo.txt
!docs/config.yml
node_modules
package-lock.json
Dockerfile.Test
Copy link
Owner

Choose a reason for hiding this comment

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

I think it is something from your local tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes

Copy link
Owner

@0xERR0R 0xERR0R left a comment

Choose a reason for hiding this comment

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

Looks good for me, please run "go mod tidy" and commit the changes, I think there is something wrong

go.mod Show resolved Hide resolved
@kwitsch
Copy link
Collaborator Author

kwitsch commented Nov 6, 2021

Looks good for me, please run "go mod tidy" and commit the changes, I think there is something wrong

Sorry currently not at home.
I can commit it tomorrow.

@0xERR0R
Copy link
Owner

0xERR0R commented Nov 6, 2021

Thanks for your work, I had some spare time today and I think we can merge it now

@0xERR0R 0xERR0R merged commit 3adad4a into 0xERR0R:development Nov 6, 2021
@kwitsch kwitsch deleted the #287 branch November 15, 2021 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not cache nxdomain
2 participants