From 8d320497d6ed522af0b3ce110d5cf8db52300bea Mon Sep 17 00:00:00 2001 From: Lucas Hansen Date: Mon, 2 Apr 2018 16:37:08 -0700 Subject: [PATCH] Cache linker cache files in memory (#9794) --- tools/isobuild/compiler-plugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 1d22b22bac..a352c9d063 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -18,6 +18,7 @@ import {cssToCommonJS} from "./css-modules.js"; import Resolver from "./resolver.js"; import { optimisticStatOrNull, + optimisticReadJsonOrNull, } from "../fs/optimistic.js"; import { isTestFilePath } from './test-files.js'; @@ -1406,7 +1407,7 @@ export class PackageSourceBatch { if (cacheFilename) { let diskCached = null; try { - diskCached = files.readJSONOrNull(cacheFilename); + diskCached = optimisticReadJsonOrNull(cacheFilename); } catch (e) { // Ignore JSON parse errors; pretend there was no cache. if (!(e instanceof SyntaxError)) {