DNS IPs should only be cached for 1 minute.

This commit is contained in:
Joseph Hirschfeld 2015-11-06 12:46:14 -05:00 committed by md_5
parent ba448b5670
commit 19f2e7b13e

View File

@ -27,7 +27,7 @@ public class HttpClient
{
public static final int TIMEOUT = 5000;
private static final Cache<String, InetAddress> addressCache = CacheBuilder.newBuilder().expireAfterWrite( 5, TimeUnit.MINUTES ).build();
private static final Cache<String, InetAddress> addressCache = CacheBuilder.newBuilder().expireAfterWrite( 1, TimeUnit.MINUTES ).build();
@SuppressWarnings("UnusedAssignment")
public static void get(String url, EventLoop eventLoop, final Callback<String> callback)