From c89a20b42899abff5c3ea84660c8110806c5fbee Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 26 Aug 2024 19:59:17 -0400 Subject: 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. --- cli/cache/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'cli/cache') diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index 772d2359d..cc183530d 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -62,12 +62,8 @@ pub const CACHE_PERM: u32 = 0o644; pub struct RealDenoCacheEnv; impl deno_cache_dir::DenoCacheEnv for RealDenoCacheEnv { - fn read_file_bytes(&self, path: &Path) -> std::io::Result>> { - match std::fs::read(path) { - Ok(s) => Ok(Some(s)), - Err(err) if err.kind() == std::io::ErrorKind::NotFound => Ok(None), - Err(err) => Err(err), - } + fn read_file_bytes(&self, path: &Path) -> std::io::Result> { + std::fs::read(path) } fn atomic_write_file( -- cgit v1.2.3