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
Disable neg-cache for few domains #2586
Comments
You can disable negative cache by setting |
This is my config:
Can you verify this for me ? I still see the requests hitting cache for
which is missing I am using coredns |
Looks right, should work. As sanity check, you could remove the cache plugin entirely from consul server block the to see if the flags are as you expect without cache. |
@chrisohaver I did that. When cache is entirely disabled, the Also I just looked at the code to find the following in here (https://github.com/coredns/coredns/blob/master/plugin/pkg/cache/cache.go#L31-L45): // New returns a new cache.
func New(size int) *Cache {
ssize := size / shardSize
if ssize < 4 {
ssize = 4
}
c := &Cache{}
// Initialize all the shards
for i := 0; i < shardSize; i++ {
c.shards[i] = newShard(ssize)
}
return c
} which is setting the size to 4, if the derived shard_size is less than 0. So there are shards being initialized even when I requested for a cache size of zero. Did I read that right ? |
Hmm. Yes. And reading the docs again, It seems that the minimum allowed cache size is 1024. Which means there is no way to disable cache for one and not the other. So, I have misled you (and probably a few other people too). Sorry! |
Maybe if TTL 0 is allowed?
|
Seems no ...
|
@chrisohaver The binary panics and quits immediately sayong the config is invalid, possible because of this code here: https://github.com/coredns/coredns/blob/master/plugin/cache/setup.go#L67 |
Well - IMO there should be a way to disable one of the caches and not the other. |
Currently the mininal TTL settable for denial is 1s. |
Where is the bug against Python, because that looks super strange? |
This is waiting for a test to be added in #2588 |
This is fixed in 1.5.1 by setting the AA bit on cache replies. |
Is there a way to disable neg-caching for a particular domain similar to what dnsmasq provides with the no-neg-cache flag ?
I ask this to do a possible workaround to this issue I am facing here, but also wanted to understand the reasoning behind not having a flag to disable neg-cache.
The text was updated successfully, but these errors were encountered: