spotify / dns-java

DNS wrapper library that provides SRV lookup functionality
Apache License 2.0
206 stars 47 forks source link

configurable expiration of retained DNS results #20

Closed pettermahlen closed 8 years ago

pettermahlen commented 8 years ago

This is an alternative to #18.

pettermahlen commented 8 years ago

@pinux-studio, what do you think? Would this work?

pinux-studio commented 8 years ago

I don't know what magic built in to com.google.common.cache.Cache. It looks like the cache object will invalidate the value after predefined amount of time. If my understanding is correct, that is what we need. Also we set the expiration time to 2hr right?

pettermahlen commented 8 years ago

Guava caches are pretty magical indeed - see https://github.com/google/guava/wiki/CachesExplained for more info. The default is set to 2 hours in the DnsSrvResolvers class.

pinux-studio commented 8 years ago

:+1:

pinux-studio commented 8 years ago

any chance we can merge this today. I have closed mine already. also what is the release schedule of this project? I want to update hermes to using the new version.