pub trait ImmutableFileDigestCacheProvider: Sync + Send {
// Required methods
fn store<'life0, 'async_trait>(
&'life0 self,
digest_per_filenames: Vec<(ImmutableFileName, HexEncodedDigest)>,
) -> Pin<Box<dyn Future<Output = CacheProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'async_trait>(
&'life0 self,
immutables: Vec<ImmutableFile>,
) -> Pin<Box<dyn Future<Output = CacheProviderResult<BTreeMap<ImmutableFile, Option<HexEncodedDigest>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reset<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CacheProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A cache provider that store individual ImmutableFile digests.
Required Methods§
sourcefn store<'life0, 'async_trait>(
&'life0 self,
digest_per_filenames: Vec<(ImmutableFileName, HexEncodedDigest)>,
) -> Pin<Box<dyn Future<Output = CacheProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store<'life0, 'async_trait>(
&'life0 self,
digest_per_filenames: Vec<(ImmutableFileName, HexEncodedDigest)>,
) -> Pin<Box<dyn Future<Output = CacheProviderResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store the given digests
sourcefn get<'life0, 'async_trait>(
&'life0 self,
immutables: Vec<ImmutableFile>,
) -> Pin<Box<dyn Future<Output = CacheProviderResult<BTreeMap<ImmutableFile, Option<HexEncodedDigest>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
immutables: Vec<ImmutableFile>,
) -> Pin<Box<dyn Future<Output = CacheProviderResult<BTreeMap<ImmutableFile, Option<HexEncodedDigest>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Associate each given immutable files with a cached value if one exist.