diff --git a/packages/core/cache/src/LMDBCache.js b/packages/core/cache/src/LMDBCache.js index 059858ef5ee..42d27265bd5 100644 --- a/packages/core/cache/src/LMDBCache.js +++ b/packages/core/cache/src/LMDBCache.js @@ -58,9 +58,9 @@ export class LMDBCache implements Cache { } getStream(key: string): Readable { - return blobToStream( - this.store.get(key) ?? this.fs.readFileSync(path.join(this.dir, key)), - ); + let buf = this.store.get(key); + if (buf != null) return blobToStream(buf); + return this.fs.createReadStream(path.join(this.dir, key)); } async setStream(key: string, stream: Readable): Promise {