Method: Inspec::CachedFetcher#fetch
- Defined in:
- lib/inspec/cached_fetcher.rb
#fetch ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/inspec/cached_fetcher.rb', line 37 def fetch if cache.exists?(cache_key) Inspec::Log.debug "Using cached dependency for #{target}" [cache.prefered_entry_for(cache_key), false] else Inspec::Log.debug "Dependency does not exist in the cache #{target}" fetcher.fetch(cache.base_path_for(fetcher.cache_key)) assert_cache_sanity! [fetcher.archive_path, fetcher.writable?] end end |