pub struct CacheStore {
pub limits: CacheLimits,
/* private fields */
}Fields§
§limits: CacheLimitsImplementations§
Source§impl CacheStore
impl CacheStore
pub fn new( limits: CacheLimits, env: &Arc<Environment>, log_sizes: bool, ) -> Result<Self>
Sourcepub fn check(
&self,
config: &StoredCacheConfig,
cache_kind: CacheKind,
lookup: Lookup<'_>,
) -> Result<Option<Bytes>>
pub fn check( &self, config: &StoredCacheConfig, cache_kind: CacheKind, lookup: Lookup<'_>, ) -> Result<Option<Bytes>>
Check the cache_db for a hit; returns Ok(None) if not.
Sourcepub fn write(
&self,
config: &StoredCacheConfig,
cache_kind: CacheKind,
cache_key: &[u8],
cache_val: &[u8],
dependencies: Option<SmallVec<[CacheDependency; 13]>>,
value_in_memory: bool,
) -> Result<()>
pub fn write( &self, config: &StoredCacheConfig, cache_kind: CacheKind, cache_key: &[u8], cache_val: &[u8], dependencies: Option<SmallVec<[CacheDependency; 13]>>, value_in_memory: bool, ) -> Result<()>
Caches item for kind and index for specified cache key.
LMDB format (cache_db)
uuid_v7 ->
- internal 0 (vector)
- deps 0 (vector)
- quick_cache 1 (bool)
- value_in_memory 1 (bool)
- value 1 (blob)pub async fn dependency_evict( &self, dependencies: Vec<CacheDependency>, ) -> Result<()>
pub async fn artifact_evict( &self, config: &StoredCache, kind: CacheKind, idx: u8, ) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for CacheStore
impl !UnwindSafe for CacheStore
impl Freeze for CacheStore
impl Send for CacheStore
impl Sync for CacheStore
impl Unpin for CacheStore
impl UnsafeUnpin for CacheStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more