@ApiStatus.Experimental
  public <R extends @NotNull PsiSymbolReference>
  @NotNull Collection<? extends @NotNull Symbol> resolveWithCaching(@NotNull R ref, boolean preventRecursion, @NotNull PsiSymbolReferenceResolver<? super R> resolver) {
    ProgressIndicatorProvider.checkCanceled();
    ApplicationManager.getApplication().assertReadAccessAllowed();
    boolean isPhysical = ref.getElement().isPhysical();
    int index = getIndex(isPhysical, false, true);
    Collection<? extends Symbol> results = resolve(ref, getMap(index), preventRecursion, () -> resolver.resolve(ref));
    return results == null ? Collections.emptyList() : results;
  }
@ApiStatus.Experimental
  public <R extends @NotNull PsiSymbolReference>
  @NotNull Collection<? extends @NotNull Symbol> resolveWithCaching(@NotNull R ref, boolean preventRecursion, @NotNull PsiSymbolReferenceResolver<? super R> resolver)