/// Attempt to cache feature database on disk.
///
/// Errors are ignored and a clean up is attempted.
Attempt to cache feature database on disk.
Errors are ignored and a clean up is attempted.
Attempt to cache feature database on disk . Errors are ignored and a clean up is attempted .
pub fn cache_put(db: &Db) {
    // if any error occurs writing file access or encoding
    // we try to delete the file to reset state for next time
    if let Err(err) = cache_put_inner(db) {
        eprintln!("cache fetch error: {}", err);
        // attempt clean up
        // errors on this are unlikely and are therefore ignored
        if let Err(err) = fs::remove_file(cache_path()) {
            eprintln!("failed to clean up cache file: {}", err);
        }
    }
}
pub fn cache_put ( db : & Db ) { // if any error occurs writing file access or encoding // we try to delete the file to reset state for next time if let Err ( err ) = cache_put_inner ( db ) { eprintln ! ( " " err ) ; // attempt clean up // errors on this are unlikely and are therefore ignored if let Err ( err ) = fs :: remove_file ( cache_path ( ) ) { eprintln ! ( " " err ) ; } } }
Attempt to cache feature database on disk.
Attempt to cache feature database on disk .
db
&Db