public static void tryInvalidateDirCache(org.apache.hadoop.hive.metastore.api.Table table) {
    if (dirCacheInited.get()) {
      String key = getFullTableName(table.getDbName(), table.getTableName()) + "_" + table.getSd().getLocation();
      boolean partitioned = table.getPartitionKeys() != null && !table.getPartitionKeys().isEmpty();
      if (!partitioned) {
        dirCache.invalidate(key);
      } else {
        // Invalidate all partitions as the difference in the key is only the partition part at the end of the path.
        dirCache.invalidateAll(
          dirCache.asMap().keySet().stream().filter(k -> k.startsWith(key)).collect(Collectors.toSet()));
      }
    }
  }
Tries to get directory details from cache. For now, cache is valid only
when base directory is available and no deltas are present. This should
be used only in BI strategy and for ACID tables.

@param fileSystem file system supplier
@param candidateDirectory the partition directory to analyze
@param conf the configuration
@param writeIdList the list of write ids that we are reading
@param useFileIds It will be set to true, if the FileSystem supports listing with fileIds
@param ignoreEmptyFiles Ignore files with 0 length
@return directory state
@throws IOException on errors
ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java