code: public void close() throws IOException {
          for (CloseableHttpClient c : cachedClients.values()) {
              c.close();
          }
          cachedClients.clear();
      }
docs: Close all HTTP clients created by this factory
  @throws IOException if an I/O error occurs