Skip to main content

FileMetadataCache

Type Alias FileMetadataCache 

Source
pub type FileMetadataCache = dyn Cache<Path, CachedFileMetadataEntry>;
Expand description

A cache for storing file-embedded metadata.

This cache stores per-file metadata in the form of CachedFileMetadataEntry, which includes the ObjectMeta for validation.

For example, the built in ListingTable uses this cache to avoid parsing Parquet footers multiple times for the same file.

The typical usage pattern is:

  1. Call get(path) to check for cached value
  2. If Some(cached), validate with cached.is_valid_for(&current_meta)
  3. If invalid or missing, compute new value and call put(path, new_value)

See crate::runtime_env::RuntimeEnv for more details.