pub trait FileMetadataCache: CacheAccessor<ObjectMeta, Arc<dyn FileMetadata>, Extra = ObjectMeta> {
// Required methods
fn cache_limit(&self) -> usize;
fn update_cache_limit(&self, limit: usize);
fn list_entries(&self) -> HashMap<Path, FileMetadataCacheEntry>;
}
Expand description
Cache for file-embedded metadata.
This cache stores per-file metadata in the form of FileMetadata
,
For example, the built in ListingTable
uses this cache to avoid parsing
Parquet footers multiple times for the same file.
DataFusion provides a default implementation, DefaultFilesMetadataCache
,
and users can also provide their own implementations to implement custom
caching strategies.
See crate::runtime_env::RuntimeEnv
for more details.
Required Methods§
Sourcefn cache_limit(&self) -> usize
fn cache_limit(&self) -> usize
Returns the cache’s memory limit in bytes.
Sourcefn update_cache_limit(&self, limit: usize)
fn update_cache_limit(&self, limit: usize)
Updates the cache with a new memory limit in bytes.
Sourcefn list_entries(&self) -> HashMap<Path, FileMetadataCacheEntry>
fn list_entries(&self) -> HashMap<Path, FileMetadataCacheEntry>
Retrieves the information about the entries currently cached.