From 1fce59281c38c83c937c01ff92f8656da44ccada Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 3 May 2024 20:52:58 +0100 Subject: refactor(lsp): cleanup cache and module registry update (#23620) --- cli/lsp/npm.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli/lsp/npm.rs') diff --git a/cli/lsp/npm.rs b/cli/lsp/npm.rs index 830aaed95..6cd6882b4 100644 --- a/cli/lsp/npm.rs +++ b/cli/lsp/npm.rs @@ -34,6 +34,12 @@ impl CliNpmSearchApi { versions_cache: Default::default(), } } + + pub fn clear_cache(&self) { + self.file_fetcher.clear_memory_files(); + self.search_cache.clear(); + self.versions_cache.clear(); + } } #[async_trait::async_trait] -- cgit v1.2.3