Skip to main content

db_path_hash

Function db_path_hash 

Source
pub fn db_path_hash(db_path: &Path) -> String
Expand description

Computes a short, filesystem-safe hash of the database path so two distinct databases (e.g. /tmp/a.sqlite and /tmp/b.sqlite) get distinct lock files in the shared cache directory. First 12 hex chars of BLAKE3 are sufficient for collision avoidance across the local filesystem.