protected static @NotNull <T extends PyAbstractPackageCache> T load(@NotNull Class<T> classToken,
                                                                      @NotNull T fallbackValue,
                                                                      @NotNull Path cacheFilePath) {
    T cache = fallbackValue;
    try (Reader reader = Files.newBufferedReader(cacheFilePath, StandardCharsets.UTF_8)) {
      cache = ourGson.fromJson(reader, classToken);
      LOG.info("Loaded " + cache.getPackageNames().size() + " packages from " + cacheFilePath);
    }
    catch (NoSuchFileException exception) {
      if (!ApplicationManager.getApplication().isUnitTestMode()) {
        LOG.info("Package cache " + cacheFilePath + " was not found");
      }
    }
    catch (JsonSyntaxException exception) {
      LOG.warn("Corrupted package cache " + cacheFilePath, exception);
      try {
        // It will be rebuilt on the next startup or displaying packaging UI
        Files.deleteIfExists(cacheFilePath);
      }
      catch (IOException ignored) {
      }
    }
    catch (IOException | JsonIOException exception) {
      LOG.warn("Cannot load package cache " + cacheFilePath, exception);
    }
    return cache;
  }
protected static @NotNull <T extends PyAbstractPackageCache> T load(@NotNull Class<T> classToken,
                                                                      @NotNull T fallbackValue,
                                                                      @NotNull Path cacheFilePath)