Open ppanero opened 7 years ago
MiniDNS should already cache negative responses. Or am I missing someting?
The main discussion venue for MiniDNS is the #smack IRC channel at Freenode.
In this case:
val client = new DNSClient(new LRUCache(3));
val resolver = new ResolverApi(client)
//client.getCache.asInstanceOf[LRUCache].getMissCount
val result = resolver.resolve("www.asdasd.co.uk", classOf[A])
val result2 = resolver.resolve("www.asdasd.co.uk", classOf[A])
Shouldn't the second one have been cached as a negative entry? Same should happen for an IP that give NX_DOMAIN in every DNS server. Right?
Sorry, I was wrong. MiniDNS does not yet cache negative results.
@Flowdalic Is anyone working on this? If not, do you want me to do it?
@Flowdalic Is anyone working on this? If not, do you want me to do it?
I'm not aware of anyone working on it. And I certainly will not you stop from doing so :) Is this regarding of GSOC or so?
@Flowdalic Nope. We would like to use it for some project at CERN. I will try to do it then. Any special thing to have into account?
@Flowdalic Nope. We would like to use it for some project at CERN. I will try to do it then. Any special thing to have into account?
When I worked on MiniDNS's cache I found that correctly caching DNS information is harder that I expected. It's not just as simple as a key/value key, although one may think so. It gets even more complicated if you want to use the information found in DNS replies to synthesize answers for other questions. I'm happy to support you whenever I can, but ideally not via this github issue. So feel encouraged to start an conversation with me in the Smack's IRC channel (#smack, freenode).
From #85
This mostly includes caching of NX_DOMAIN and optionally, if DNSSEC is used, NSEC and NSEC3 proofs of non-existence. Probably not trivial to implement.
Hello @Flowdalic , I do not longer work on the project that was using this library. I can try contact them. Nonetheless, from my side, if not needed for you, it can be closed. Cheers!
No need to close this issue until negative caching is implemented.
Add support for negative caching. I offer myself to implement this feature, but I would like to have a chat in order to discuss possible implementations (Gitter?)