alamb commented on code in PR #17126: URL: https://github.com/apache/datafusion/pull/17126#discussion_r2267840010
########## datafusion/execution/src/cache/cache_manager.rs: ########## @@ -42,17 +43,36 @@ pub trait FileMetadata: Any + Send + Sync { /// Returns the size of the metadata in bytes. fn memory_size(&self) -> usize; + + /// Returns extra information about this entry (used by [`FileMetadataCache::list_entries`]). + fn extra_info(&self) -> HashMap<String, String>; } /// Cache to store file-embedded metadata. pub trait FileMetadataCache: CacheAccessor<ObjectMeta, Arc<dyn FileMetadata>, Extra = ObjectMeta> { - // Returns the cache's memory limit in bytes. + /// Returns the cache's memory limit in bytes. fn cache_limit(&self) -> usize; - // Updates the cache with a new memory limit in bytes. + /// Updates the cache with a new memory limit in bytes. fn update_cache_limit(&self, limit: usize); + + /// Retrieves the information about the entries currently cached. Review Comment: Nice -- this is a very nice public API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org