load_cache

Function load_cache 

Source
pub fn load_cache(
    path: &PathBuf,
    current_signature: &[String],
) -> Option<Vec<ServiceImpact>>
Expand description

What: Load cached service impact data when the stored signature matches the current list.

Inputs:

  • path: Filesystem location of the serialized ServiceCache JSON.
  • current_signature: Signature derived from the current install list for validation.

Output:

  • Some(Vec<ServiceImpact>) when the cache exists, deserializes, and signatures agree; None otherwise.

Details:

  • Reads the JSON, deserializes it, sorts both signatures, and compares them before returning the cached service impact data.