pub struct CacheLayer {
pub videos: VideoCache,
pub downloads: DownloadCache,
pub playlists: PlaylistCache,
}Expand description
Consolidated cache layer combining video, download, and playlist caches.
Created from a CacheConfig and stored as Option<Arc<CacheLayer>> on the
Downloader. Each sub-cache uses its own TTL from the config, falling back
to its domain-specific default.
Fields§
§videos: VideoCacheVideo metadata cache (tiered L1/L2).
downloads: DownloadCacheDownloaded file metadata cache (tiered L1/L2).
playlists: PlaylistCachePlaylist metadata cache (tiered L1/L2).
Implementations§
Source§impl CacheLayer
impl CacheLayer
Sourcepub async fn from_config(config: &CacheConfig) -> Result<Self>
pub async fn from_config(config: &CacheConfig) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CacheLayer
impl !UnwindSafe for CacheLayer
impl Freeze for CacheLayer
impl Send for CacheLayer
impl Sync for CacheLayer
impl Unpin for CacheLayer
impl UnsafeUnpin for CacheLayer
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.