private @NotNull CodeStyleCachedValueProvider getOrCreateCachedValueProvider(@NotNull VirtualFile virtualFile) {
    synchronized (CACHE_LOCK) {
      FileData fileData = getOrCreateFileData(getFileKey(virtualFile));
      SoftReference<CodeStyleCachedValueProvider> providerRef = fileData.getUserData(PROVIDER_KEY);
      CodeStyleCachedValueProvider provider = providerRef != null ? providerRef.get() : null;
      if (provider == null || provider.isExpired()) {
        Supplier<VirtualFile> fileSupplier;
        if (virtualFile instanceof LightVirtualFile) {
          LightVirtualFile copy = getCopy((LightVirtualFile)virtualFile);
          fileSupplier = () -> getCopy(copy); // create new copy each time it requested to make sure the attached PSI is collected
        }
        else {
          fileSupplier = () -> virtualFile;
        }
        provider = new CodeStyleCachedValueProvider(fileSupplier, myProject, fileData);
        fileData.putUserData(PROVIDER_KEY, new SoftReference<>(provider));
      }
      return provider;
    }
  }
private @NotNull CodeStyleCachedValueProvider getOrCreateCachedValueProvider(@NotNull VirtualFile virtualFile)