fixes #433
Merge pull request #2 from econsultancy/remove-memoize

Cherry-pick upstream commit to remove deprecation warning