/// Check if there is compiled source in cache that is valid and can be used
/// again.
Check if there is compiled source in cache that is valid and can be used
again.
Check if there is compiled source in cache that is valid and can be used again .
fn has_compiled_source(&self, url: &Url) -> bool {
    let specifier = ModuleSpecifier::from(url.clone());
    if let Some(source_file) = self
      .file_fetcher
      .fetch_cached_source_file(&specifier, Permissions::allow_all())
    {
      if let Some(metadata) = self.get_metadata(&url) {
        // Compare version hashes
        let version_hash_to_validate = source_code_version_hash(
          &source_file.source_code,
          version::DENO,
          &self.config.hash,
        );
        if metadata.version_hash == version_hash_to_validate {
          return true;
        }
      }
    }
    false
  }
fn has_compiled_source ( & self , url : & Url ) -> bool { let specifier = ModuleSpecifier :: from ( url . clone ( ) ) ; if let Some ( source_file ) = self . file_fetcher . fetch_cached_source_file ( & specifier , Permissions :: allow_all ( ) ) { if let Some ( metadata ) = self . get_metadata ( & url ) { // Compare version hashes let version_hash_to_validate = source_code_version_hash ( & source_file . source_code , version :: DENO , & self . config . hash , ) ; if metadata . version_hash == version_hash_to_validate { return true ; } } } false }
Check if there is compiled source in cache that is valid and can be used
again.
Check if there is compiled source in cache that is valid and can be used again .
&self
url
&Url