CacheManagerConfig

Struct CacheManagerConfig 

Source
pub struct CacheManagerConfig {
    pub table_files_statistics_cache: Option<Arc<dyn FileStatisticsCache>>,
    pub list_files_cache: Option<Arc<dyn ListFilesCache>>,
    pub list_files_cache_limit: usize,
    pub list_files_cache_ttl: Option<Duration>,
    pub file_metadata_cache: Option<Arc<dyn FileMetadataCache>>,
    pub metadata_cache_limit: usize,
}

Fields§

§table_files_statistics_cache: Option<Arc<dyn FileStatisticsCache>>

Enable caching of file statistics when listing files. Enabling the cache avoids repeatedly reading file statistics in a DataFusion session. Default is disabled. Currently only Parquet files are supported.

§list_files_cache: Option<Arc<dyn ListFilesCache>>

Enable caching of file metadata when listing files. Enabling the cache avoids repeat list and object metadata fetch operations, which may be expensive in certain situations (e.g. remote object storage), for objects under paths that are cached. Note that if this option is enabled, DataFusion will not see any updates to the underlying storage for at least list_files_cache_ttl duration. Default is disabled.

§list_files_cache_limit: usize

Limit of the list_files_cache, in bytes. Default: 1MiB.

§list_files_cache_ttl: Option<Duration>

The duration the list files cache will consider an entry valid after insertion. Note that changes to the underlying storage system, such as adding or removing data, will not be visible until an entry expires. Default: None (infinite).

§file_metadata_cache: Option<Arc<dyn FileMetadataCache>>

Cache of file-embedded metadata, used to avoid reading it multiple times when processing a data file (e.g., Parquet footer and page metadata). If not provided, the CacheManager will create a DefaultFilesMetadataCache.

§metadata_cache_limit: usize

Limit of the file-embedded metadata cache, in bytes.

Implementations§

Source§

impl CacheManagerConfig

Source

pub fn with_files_statistics_cache( self, cache: Option<Arc<dyn FileStatisticsCache>>, ) -> Self

Set the cache for files statistics.

Default is None (disabled).

Source

pub fn with_list_files_cache( self, cache: Option<Arc<dyn ListFilesCache>>, ) -> Self

Set the cache for listing files.

Default is None (disabled).

Source

pub fn with_list_files_cache_limit(self, limit: usize) -> Self

Sets the limit of the list files cache, in bytes.

Default: 1MiB (1,048,576 bytes).

Source

pub fn with_list_files_cache_ttl(self, ttl: Option<Duration>) -> Self

Sets the TTL (time-to-live) for entries in the list files cache.

Default: None (infinite).

Source

pub fn with_file_metadata_cache( self, cache: Option<Arc<dyn FileMetadataCache>>, ) -> Self

Sets the cache for file-embedded metadata.

Default is a DefaultFilesMetadataCache.

Source

pub fn with_metadata_cache_limit(self, limit: usize) -> Self

Sets the limit of the file-embedded metadata cache, in bytes.

Trait Implementations§

Source§

impl Clone for CacheManagerConfig

Source§

fn clone(&self) -> CacheManagerConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for CacheManagerConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,