pub fn upsert(path: &Path, key: &str, entry: CacheEntry) -> Result<()>
Replace one entry atomically (load → mutate → save).