private void refreshCacheAsync(final ChangesCacheFile cache, final boolean initIfEmpty,
                                 final @Nullable RefreshResultConsumer consumer, final boolean asynch) {
    try {
      if (!initIfEmpty && cache.isEmpty()) {
        return;
      }
    }
    catch (IOException e) {
      LOG.error(e);
      return;
    }
    final Runnable task = () -> {
      try {
        final List<CommittedChangeList> list;
        if (initIfEmpty && cache.isEmpty()) {
          list = initCache(cache);
        }
        else {
          list = refreshCache(cache);
        }
        if (consumer != null) {
          consumer.receivedChanges(list);
        }
      }
      catch(ProcessCanceledException ex) {
        // ignore
      }
      catch (IOException e) {
        LOG.error(e);
      }
      catch (VcsException e) {
        if (consumer != null) {
          consumer.receivedError(e);
        }
      }
    };
    if (asynch) {
      myTaskQueue.run(task);
    } else {
      task.run();
    }
  }
private void refreshCacheAsync(final ChangesCacheFile cache, final boolean initIfEmpty,
                                 final @Nullable RefreshResultConsumer consumer, final boolean asynch)