@NotNull
  private Response fetch(@NotNull String query, int caret, boolean ignoreCaret) throws Exception {
    LOG.debug("Query: '" + query + "' caret at: " + caret);
    final Pair<String, Integer> lookup = Pair.create(query, caret);
    Response response = null;
    if (ignoreCaret) {
      for (Pair<String, Integer> pair : ourCache.keySet()) {
        if (pair.getFirst().equals(query)) {
          response = ourCache.get(pair);
          break;
        }
      }
    }
    else {
      response = ourCache.get(lookup);
    }
    LOG.debug("Cache " + (response != null? "hit" : "miss"));
    if (response == null) {
      final long startTime = System.currentTimeMillis();
      URI endpoint = new URIBuilder(myRepository.getRestApiUrl("api", "search", "assist"))
        .addParameter("fields", Response.DEFAULT_FIELDS)
        .build();
      HttpPost request = new HttpPost(endpoint);
      Gson gson = TaskGsonUtil.createDefaultBuilder().create();
      Map<String, Object> payload = Map.of(
        "query", query,
        "caret", caret
      );
      request.setEntity(new StringEntity(gson.toJson(payload), ContentType.APPLICATION_JSON));
      response = myRepository.getHttpClient().execute(request, new GsonSingleObjectDeserializer<>(gson, Response.class));
      LOG.debug(String.format("Intellisense request to YouTrack took %d ms to complete", System.currentTimeMillis() - startTime));
      ourCache.put(lookup, response);
    }
    return response;
  }
@NotNull
  private Response fetch(@NotNull String query, int caret, boolean ignoreCaret)