fix(plugins): prevent paging plugins from cache at runtime (#4044)
This commit is contained in:
parent
3e694d2e49
commit
2fe960a16d
1 changed files with 2 additions and 1 deletions
|
|
@ -529,7 +529,8 @@ impl<'a> PluginLoader<'a> {
|
||||||
);
|
);
|
||||||
let (_wasm_bytes, cached_path) = self.plugin_bytes_and_cache_path()?;
|
let (_wasm_bytes, cached_path) = self.plugin_bytes_and_cache_path()?;
|
||||||
let timer = std::time::Instant::now();
|
let timer = std::time::Instant::now();
|
||||||
let module = unsafe { Module::deserialize_file(&self.engine, &cached_path)? };
|
let file_in_cache = std::fs::read(&cached_path)?;
|
||||||
|
let module = unsafe { Module::deserialize(&self.engine, file_in_cache)? };
|
||||||
log::info!(
|
log::info!(
|
||||||
"Loaded plugin '{}' from cache folder at '{}' in {:?}",
|
"Loaded plugin '{}' from cache folder at '{}' in {:?}",
|
||||||
self.plugin_path.display(),
|
self.plugin_path.display(),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue