diff --git a/core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java b/core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java index a3d32315a..4430e9bba 100644 --- a/core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java +++ b/core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java @@ -20,7 +20,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.List; -import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; @@ -35,12 +34,6 @@ import org.jivesoftware.smack.util.dns.SRVRecord; */ public class DNSUtil { - /** - * Create a cache to hold the 100 most recently accessed DNS lookups for a period of - * 10 minutes. - */ - private static Map> cache = new Cache>(100, 1000*60*10); - private static DNSResolver dnsResolver = null; /** @@ -116,16 +109,6 @@ public class DNSUtil { } private static List resolveDomain(String domain, char keyPrefix) throws Exception { - // Prefix the key with 's' to distinguish him from the client domain lookups - String key = keyPrefix + domain; - // Return item from cache if it exists. - if (cache.containsKey(key)) { - List addresses = cache.get(key); - if (addresses != null) { - return addresses; - } - } - List addresses = new ArrayList(); // Step one: Do SRV lookups @@ -145,9 +128,6 @@ public class DNSUtil { // Step two: Add the hostname to the end of the list addresses.add(new HostAddress(domain)); - // Add item to cache. - cache.put(key, addresses); - return addresses; }