-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
When the memoized function returns undefined
for a specific parameter, another call to the memoized function runs the original function again as opposed to fetching the result from the cache.
Reproducible Example:
const memoize = require('fast-memoize')
const assert = require('assert')
let numCalled = 0
function longProcess(arg) {
++numCalled
return
}
// memoize result
const memoizedProcess = memoize(longProcess)
memoizedProcess("foo")
// get memoized result
memoizedProcess("foo")
assert(numCalled === 1)
It seems like this changed from v2.2.8
to v2.3.0
. Is this the intended behaviour?
Metadata
Metadata
Assignees
Labels
No labels