pub fn clear_cache<Tree: MerkleTreeTrait>(cache_dir: &Path) -> Result<()> {
    info!("clear_cache:start");

    let t_aux = {
        let f_aux_path = cache_dir.to_path_buf().join(CacheKey::TAux.to_string());
        let aux_bytes = std::fs::read(&f_aux_path)
            .with_context(|| format!("could not read from path={:?}", f_aux_path))?;

        deserialize(&aux_bytes)
    }?;

    let result = TemporaryAux::<Tree, DefaultPieceHasher>::clear_temp(t_aux);

    info!("clear_cache:finish");

    result
}
// Ensure that any associated cached data persisted is discarded.
Ensure that any associated cached data persisted is discarded.
Ensure that any associated cached data persisted is discarded .
pub fn clear_cache<Tree: MerkleTreeTrait>(cache_dir: &Path) -> Result<()> {
    info!("clear_cache:start");
    let t_aux = {
        let f_aux_path = cache_dir.to_path_buf().join(CacheKey::TAux.to_string());
        let aux_bytes = std::fs::read(&f_aux_path)
            .with_context(|| format!("could not read from path={:?}", f_aux_path))?;
        deserialize(&aux_bytes)
    }?;
    let result = TemporaryAux::<Tree, DefaultPieceHasher>::clear_temp(t_aux);
    info!("clear_cache:finish");
    result
}
pub fn clear_cache < Tree : MerkleTreeTrait > ( cache_dir : & Path ) -> Result < ( ) > { info ! ( " " ) ; let t_aux = { let f_aux_path = cache_dir . to_path_buf ( ) . join ( CacheKey :: TAux . to_string ( ) ) ; let aux_bytes = std :: fs :: read ( & f_aux_path ) . with_context ( | | format ! ( " " f_aux_path ) ) ? ; deserialize ( & aux_bytes ) } ? ; let result = TemporaryAux :: < Tree , DefaultPieceHasher > :: clear_temp ( t_aux ) ; info ! ( " " ) ; result }
Ensure that any associated cached data persisted is discarded.
Ensure that any associated cached data persisted is discarded .
cache_dir
&Path
cache_dir
&Path