diff --git a/lib/wasix/src/runtime/package_loader/builtin_loader.rs b/lib/wasix/src/runtime/package_loader/builtin_loader.rs index 10833fd5b70..ecdc7aae620 100644 --- a/lib/wasix/src/runtime/package_loader/builtin_loader.rs +++ b/lib/wasix/src/runtime/package_loader/builtin_loader.rs @@ -73,6 +73,11 @@ impl BuiltinPackageLoader { )) } + /// Insert a container into the in-memory hash. + pub fn insert_cached(&self, hash: WebcHash, container: &Container) { + self.in_memory.save(container, hash); + } + #[tracing::instrument(level = "debug", skip_all, fields(pkg.hash=%hash))] async fn get_cached(&self, hash: &WebcHash) -> Result, Error> { if let Some(cached) = self.in_memory.lookup(hash) {