Index: trunk/src/org/openstreetmap/josm/io/imagery/ApiKeyProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ApiKeyProvider.java	(revision 15866)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ApiKeyProvider.java	(revision 15868)
@@ -6,5 +6,7 @@
 import java.net.URL;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.openstreetmap.josm.data.Preferences;
@@ -19,4 +21,6 @@
  */
 public final class ApiKeyProvider {
+
+    private static final Map<String, String> CACHE = new HashMap<>();
 
     private ApiKeyProvider() {
@@ -36,9 +40,14 @@
      */
     public static String retrieveApiKey(String imageryId) throws IOException {
+        if (CACHE.containsKey(imageryId)) {
+            return CACHE.get(imageryId);
+        }
         for (String siteUrl : getApiKeySites()) {
             Response response = HttpClient.create(new URL(siteUrl + imageryId)).connect();
             try {
                 if (response.getResponseCode() == HttpURLConnection.HTTP_OK) {
-                    return Utils.strip(response.fetchContent());
+                    String key = Utils.strip(response.fetchContent());
+                    CACHE.put(imageryId, key);
+                    return key;
                 }
             } finally {
