pub fn load_cache(
path: &PathBuf,
current_signature: &[String],
) -> Option<Vec<SandboxInfo>>Expand description
What: Load cached sandbox data when the stored signature matches the current list.
Inputs:
path: Filesystem location of the serializedSandboxCacheJSON.current_signature: Signature derived from the current install list for validation.
Output:
Some(Vec<SandboxInfo>)when the cache exists, deserializes, and signatures agree;Noneotherwise.
Details:
- Reads the JSON, deserializes it, sorts both signatures, and compares them before returning the cached sandbox data.
- Uses partial matching to load entries for packages that exist in both cache and current list.