mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
refactor(lsp): cleanup cache and module registry update (#23620)
This commit is contained in:
parent
02d0ff58d2
commit
1fce59281c
6 changed files with 138 additions and 153 deletions
|
@ -116,6 +116,10 @@ impl MemoryFiles {
|
|||
pub fn insert(&self, specifier: ModuleSpecifier, file: File) -> Option<File> {
|
||||
self.0.lock().insert(specifier, file)
|
||||
}
|
||||
|
||||
pub fn clear(&self) {
|
||||
self.0.lock().clear();
|
||||
}
|
||||
}
|
||||
|
||||
/// Fetch a source file from the local file system.
|
||||
|
@ -616,6 +620,10 @@ impl FileFetcher {
|
|||
pub fn insert_memory_files(&self, file: File) -> Option<File> {
|
||||
self.memory_files.insert(file.specifier.clone(), file)
|
||||
}
|
||||
|
||||
pub fn clear_memory_files(&self) {
|
||||
self.memory_files.clear();
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue