//! Cache DB maintenance helpers (open with rebuild-on-corruption).
use Path;
use SecretBox;
use Vault;
use schema;
use cratedelete_database_files;
use crateStorageResult;
/// Opens the cache DB through `Vault`, rebuilding on any open / key /
/// integrity failure.
///
/// Cache contents are non-authoritative and regenerable, so the policy
/// here is "blow it away and retry" rather than the credential vault's
/// fatal-on-integrity contract.
///
/// # Errors
///
/// Returns an error if the database cannot be opened or rebuilt.
pub