summaryrefslogtreecommitdiff
path: root/cli/lsp/jsr.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-08-26 19:59:17 -0400
committerGitHub <noreply@github.com>2024-08-26 23:59:17 +0000
commitc89a20b42899abff5c3ea84660c8110806c5fbee (patch)
treee9d93ce49b391faf0058bd3223ba72d398f78fc8 /cli/lsp/jsr.rs
parente13230226fe91498b3a5f28a8de6edbe4f164944 (diff)
perf(cache): single cache file for remote modules (#24983)
This changes the global cache to store the cache file for remote modules in one file instead of two.
Diffstat (limited to 'cli/lsp/jsr.rs')
-rw-r--r--cli/lsp/jsr.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/cli/lsp/jsr.rs b/cli/lsp/jsr.rs
index 9ffcdf9e6..c0a82383d 100644
--- a/cli/lsp/jsr.rs
+++ b/cli/lsp/jsr.rs
@@ -258,12 +258,9 @@ fn read_cached_url(
cache: &Arc<dyn HttpCache>,
) -> Option<Vec<u8>> {
cache
- .read_file_bytes(
- &cache.cache_item_key(url).ok()?,
- None,
- deno_cache_dir::GlobalToLocalCopy::Disallow,
- )
+ .get(&cache.cache_item_key(url).ok()?, None)
.ok()?
+ .map(|f| f.content)
}
#[derive(Debug)]