pub struct RemoteCache { /* private fields */ }Expand description
Remote cache orchestrator.
Handles cache operations and integrates with task execution.
Implementations§
Source§impl RemoteCache
impl RemoteCache
Sourcepub fn new(
backend: Box<dyn RemoteCacheBackend>,
config: RemoteCacheConfig,
) -> Self
pub fn new( backend: Box<dyn RemoteCacheBackend>, config: RemoteCacheConfig, ) -> Self
Creates a new remote cache with the given backend and configuration.
Sourcepub fn from_config(config: RemoteCacheConfig) -> Result<Self>
pub fn from_config(config: RemoteCacheConfig) -> Result<Self>
Creates a remote cache from configuration.
Automatically selects the appropriate backend based on the URL.
§Errors
Returns an error if backend creation fails.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Checks if remote cache is enabled.
Sourcepub async fn has_artifact(&self, key: &CacheKey) -> Result<bool>
pub async fn has_artifact(&self, key: &CacheKey) -> Result<bool>
Sourcepub async fn build_cache_key(
&self,
package: &Package,
task_name: &str,
command: &str,
graph: &DependencyGraph,
package_path: &Path,
) -> Result<CacheKey>
pub async fn build_cache_key( &self, package: &Package, task_name: &str, command: &str, graph: &DependencyGraph, package_path: &Path, ) -> Result<CacheKey>
Sourcepub fn config(&self) -> &RemoteCacheConfig
pub fn config(&self) -> &RemoteCacheConfig
Returns the configuration.
Auto Trait Implementations§
impl Freeze for RemoteCache
impl !RefUnwindSafe for RemoteCache
impl Send for RemoteCache
impl Sync for RemoteCache
impl Unpin for RemoteCache
impl !UnwindSafe for RemoteCache
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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