Skip to content

clearCacheTagsMap is always growing, memory leak? #58

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
tomer-cohen-cyera opened this issue Mar 13, 2024 · 2 comments
Open

clearCacheTagsMap is always growing, memory leak? #58

tomer-cohen-cyera opened this issue Mar 13, 2024 · 2 comments

Comments

@tomer-cohen-cyera
Copy link

Hi,
been using this to cache my datasource objects created by typeORM, we see a memory leak after adding the cache.
after profiling and debugging i saw that the clearCacheTagsMap in line 45 in the memoize-decorator.js is always growing, and it holds a reference to the cached items...

am i getting this wrong? is there a quick fix?
thanks got the help!

@vstefanovic97
Copy link

@tomer-cohen-cyera hi I created a PR that I think should address the issue
#60

@tomer-cohen-cyera
Copy link
Author

looks good. we don't use the size returned by the clear method anyway, not sure what it would be useful for...
let me know if this ever gets merged. thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants