Last active
October 23, 2019 01:30
-
-
Save isaacs/f5e33bff9eeab07aad1cc80a9a3c2425 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cache.js b/cache.js | |
index ee2ba68..ff7e1a4 100644 | |
--- a/cache.js | |
+++ b/cache.js | |
@@ -65,10 +65,10 @@ module.exports = class Cache { | |
// avoid opening cache file handles until a user actually tries to | |
// read from it. | |
const body = new Minipass() | |
- const notFitInMemory = false && info.size > MAX_MEM_SIZE | |
+ const fitInMemory = info.size < MAX_MEM_SIZE | |
const removeOnResume = () => body.removeListener('resume', onResume) | |
const onResume = | |
- opts.memoize !== notFitInMemory | |
+ opts.memoize !== false && fitInMemory | |
? () => { | |
const c = cacache.get.stream.byDigest(cachePath, info.integrity, { | |
memoize: opts.memoize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment