MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / clear_image_cache

Method clear_image_cache

kms/src/main_service.rs:479–488  ·  view source on GitHub ↗
(self, request: ClearImageCacheRequest)

Source from the content-addressed store, hash-verified

477 }
478
479 async fn clear_image_cache(self, request: ClearImageCacheRequest) -> Result<()> {
480 self.ensure_admin(&request.token)?;
481 self.remove_cache(&self.image_cache_dir(), &request.image_hash)
482 .context("Failed to clear image cache")?;
483 // Clear measurement cache (now handled by verifier's cache in measurements/ dir)
484 let mr_cache_dir = self.state.config.image.cache_dir.join("measurements");
485 self.remove_cache(&mr_cache_dir, &request.config_hash)
486 .context("Failed to clear measurement cache")?;
487 Ok(())
488 }
489}
490
491impl RpcCall<KmsState> for RpcHandler {

Callers

nothing calls this directly

Calls 3

ensure_adminMethod · 0.80
remove_cacheMethod · 0.80
image_cache_dirMethod · 0.80

Tested by

no test coverage detected