pub(crate) async fn create(opts: Options) -> Result<Self> {
        // create the base directory for the cache
        afs::create_dir_all(&opts.path)
            .await
            .map_err(ForcepError::Io)?;

        let mut meta_path = opts.path.clone();
        meta_path.push("index");
        Ok(Self {
            meta: MetaDb::new(&meta_path)?,
            mem: MemCache::new(opts.lru_size),
            opts,
        })
    }
/// Creates a new Cache instance based on the CacheBuilder
Creates a new Cache instance based on the CacheBuilder
Creates a new Cache instance based on the CacheBuilder
pub(crate) async fn create(opts: Options) -> Result<Self> {
        // create the base directory for the cache
        afs::create_dir_all(&opts.path)
            .await
            .map_err(ForcepError::Io)?;
        let mut meta_path = opts.path.clone();
        meta_path.push("index");
        Ok(Self {
            meta: MetaDb::new(&meta_path)?,
            mem: MemCache::new(opts.lru_size),
            opts,
        })
    }
pub ( crate ) async fn create ( opts : Options ) -> Result < Self > { // create the base directory for the cache afs :: create_dir_all ( & opts . path ) . await . map_err ( ForcepError :: Io ) ? ; let mut meta_path = opts . path . clone ( ) ; meta_path . push ( " " ) ; Ok ( Self { meta : MetaDb :: new ( & meta_path ) ? , mem : MemCache :: new ( opts . lru_size ) , opts , } ) }
Creates a new Cache instance based on the CacheBuilder
Creates a new Cache instance based on the CacheBuilder
opts
Options
opts
Options