@NotNull IntSet getSuitableKeyHashes(@NotNull IdFilter filter, @NotNull Project project) throws StorageException {
    IdFilter.FilterScopeType filteringScopeType = filter.getFilteringScopeType();
    IntSet hashMaskSet = null;
    long l = System.currentTimeMillis();

    @NotNull Path sessionProjectCacheFile = getSavedProjectFileValueIds(myLastScannedId,
                                                                        filteringScopeType == IdFilter.FilterScopeType.OTHER
                                                                        ? IdFilter.FilterScopeType.PROJECT_AND_LIBRARIES
                                                                        : filteringScopeType,
                                                                        project);
    int id = myKeyHashToVirtualFileMapping.getCurrentLength();

    final boolean useCachedHashIds = ENABLE_CACHED_HASH_IDS;
    if (useCachedHashIds && id == myLastScannedId) {
      if (myInvalidatedSessionIds.remove(id) == null) {
        try {
          hashMaskSet = loadProjectHashes(sessionProjectCacheFile);
        }
        catch (IOException ignored) {
        }
      }
    }

    if (hashMaskSet == null) {
      if (useCachedHashIds && myLastScannedId != 0) {
        try {
          FileUtil.delete(sessionProjectCacheFile);
        }
        catch (NoSuchFileException ignored) {

        }
        catch (IOException e) {
          LOG.error(e);
        }
      }

      hashMaskSet = getSuitableKeyHashes(filter);

      if (useCachedHashIds && filteringScopeType != IdFilter.FilterScopeType.OTHER) {
        saveHashedIds(hashMaskSet, id, filteringScopeType, project);
      }
    }

    if (LOG.isDebugEnabled()) {
      LOG.debug("Scanned keyHashToVirtualFileMapping of " + myBaseStorageFile + " for " + (System.currentTimeMillis() - l));
    }

    return hashMaskSet;
  }
@NotNull IntSet getSuitableKeyHashes(@NotNull IdFilter filter, @NotNull Project project)