private static @Nullable <T> T getOrCompute(@NotNull PsiFile psiFile,
                                              @NotNull Function<? super PsiFile, ? extends T> eval,
                                              @NotNull Key<CachedValue<T>> key) {
    return CachedValuesManager.getCachedValue(psiFile, key, () -> CachedValueProvider.Result.create(eval.fun(psiFile), psiFile));
  }
private static @Nullable <T> T getOrCompute(@NotNull PsiFile psiFile,
                                              @NotNull Function<? super PsiFile, ? extends T> eval,
                                              @NotNull Key<CachedValue<T>> key)