mkleen commented on code in PR #22613:
URL: https://github.com/apache/datafusion/pull/22613#discussion_r3329858529
##########
datafusion/execution/src/cache/cache_manager.rs:
##########
@@ -380,23 +333,21 @@ impl CacheManager {
}
Some(Arc::clone(lfc))
}
- None if config.list_files_cache_limit > 0 => {
- let lfc: Arc<dyn ListFilesCache> =
Arc::new(DefaultListFilesCache::new(
+ None if config.list_files_cache_limit > 0 => Some(Arc::new(
+ DefaultCache::<TableScopedPath, CachedFileList>::with_ttl(
config.list_files_cache_limit,
config.list_files_cache_ttl,
- ));
- Some(lfc)
- }
+ )
+ .with_name("DefaultListFilesCache"),
+ )),
_ => None,
};
let file_metadata_cache = config
.file_metadata_cache
.as_ref()
.map(Arc::clone)
- .unwrap_or_else(|| {
-
Arc::new(DefaultFilesMetadataCache::new(config.metadata_cache_limit))
- });
+ .unwrap_or_else(||
Arc::new(DefaultCache::new(config.metadata_cache_limit)));
Review Comment:
Definitely.
##########
datafusion/execution/src/cache/cache_manager.rs:
##########
@@ -380,23 +333,21 @@ impl CacheManager {
}
Some(Arc::clone(lfc))
}
- None if config.list_files_cache_limit > 0 => {
- let lfc: Arc<dyn ListFilesCache> =
Arc::new(DefaultListFilesCache::new(
+ None if config.list_files_cache_limit > 0 => Some(Arc::new(
+ DefaultCache::<TableScopedPath, CachedFileList>::with_ttl(
config.list_files_cache_limit,
config.list_files_cache_ttl,
- ));
- Some(lfc)
- }
+ )
+ .with_name("DefaultListFilesCache"),
+ )),
_ => None,
};
Review Comment:
Yes.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]