@Override
  public Data getFileData(@NotNull PsiFile file) {
    ApplicationManager.getApplication().assertReadAccessAllowed();

    if (shouldUseMemoryStorage(file)) {
      return CachedValuesManager.getManager(file.getProject()).getCachedValue(
        file, myCacheKey, () -> {
          Data data = myCalculator.calcData(file.getProject(), getVirtualFile(file));
          return CachedValueProvider.Result.create(data, file, ourReindexTracker);
        }, false);
    }

    file.putUserData(myCacheKey, null);
    return myPersistence.getFileData(file.getProject(), getVirtualFile(file));
  }
@Override
  public Data getFileData(@NotNull PsiFile file)