diff options
Diffstat (limited to 'cli/npm/registry.rs')
-rw-r--r-- | cli/npm/registry.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cli/npm/registry.rs b/cli/npm/registry.rs index 4fb926287..a0ffd0544 100644 --- a/cli/npm/registry.rs +++ b/cli/npm/registry.rs @@ -105,7 +105,6 @@ pub struct NpmRegistryApi { base_url: Url, cache: NpmCache, mem_cache: Arc<Mutex<HashMap<String, Option<NpmPackageInfo>>>>, - reload: bool, cache_setting: CacheSetting, progress_bar: ProgressBar, } @@ -133,7 +132,6 @@ impl NpmRegistryApi { pub fn new( base_url: Url, cache: NpmCache, - reload: bool, cache_setting: CacheSetting, progress_bar: ProgressBar, ) -> Self { @@ -141,7 +139,6 @@ impl NpmRegistryApi { base_url, cache, mem_cache: Default::default(), - reload, cache_setting, progress_bar, } @@ -171,7 +168,7 @@ impl NpmRegistryApi { Ok(info) } else { let mut maybe_package_info = None; - if !self.reload { + if self.cache_setting.should_use_for_npm_package(name) { // attempt to load from the file cache maybe_package_info = self.load_file_cached_package_info(name); } |