Closed bbxiao1 closed 8 years ago
Hey @bbxiao1 that's a problem. Do you think this commit fixes it for you? https://github.com/jrafanie/memoist/commit/5e6f8fb2a7f0f059f9e6d7431410984e9bbb2151
Sorry for the delay. This kept getting bumped.
It looks correct and should fix it. My bundler-git-fu is failing and I am not sure if I can checkout that specific commit anymore (the v0.13 tag got pulled?).
@bbxiao1 no problem. Just released 0.14.0 which should solve your problem.
Cheers
:confetti_ball: Looks good on my end!
The performance changes in v0.13 look really nice, but it seems to have caused a regression issue in the Rails app I am working on.
Here's a contrived example:
IRB output:
The main issue I want to highlight is the set of methods returned after
apple.unmemoize_all
. If I do the same example with v0.12:Here,
apple.unmemoize_all
returns the full list.If I am seeing the issue correctly, it is because the memoized method list is stored at the class level
Currently, I have reverted back to v0.12 just to get my build green. I believe it is possible to work around this issue by just passing in the methods manually with
flush_cache
. but it is not ideal.