/// Load the user specific cache from file system,
/// returning defaults if no such cache exists or an
/// error if we don't know where to look.
Load the user specific cache from file system,
returning defaults if no such cache exists or an
error if we don't know where to look.
Load the user specific cache from file system returning defaults if no such cache exists or an error if we don ' t know where to look .
pub async fn load() -> Result<Cache> {
        let base_dirs = BaseDirs::new().ok_or_else(||
            anyhow!("Could not resolve a path to the cache"))?;
        let mut cache_dir = base_dirs.cache_dir().to_owned();
        cache_dir.push("vault_inject");
        let cache_data = load_data(cache_dir.clone(), FILENAME).await;
        Ok(Cache {
            dir: cache_dir,
            data: cache_data
         })
    }
pub async fn load ( ) -> Result < Cache > { let base_dirs = BaseDirs :: new ( ) . ok_or_else ( | | anyhow ! ( " " ) ) ? ; let mut cache_dir = base_dirs . cache_dir ( ) . to_owned ( ) ; cache_dir . push ( " " ) ; let cache_data = load_data ( cache_dir . clone ( ) , FILENAME ) . await ; Ok ( Cache { dir : cache_dir , data : cache_data } ) }
Load the user specific cache from file system,
returning defaults if no such cache exists or an
error if we don't know where to look.
Load the user specific cache from file system returning defaults if no such cache exists or an error if we don ' t know where to look .