Title: Potential Memory Leak in @envelop/response-cache InMemoryCache #4089
Unanswered
reinaldomendes
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just a quick heads-up, we discovered a memory leak in the createInMemoryCache function that occurs under heavy eviction pressure.
The purgeResponse function doesn't clean up empty Sets from the entityToResponseIds map, causing it to grow indefinitely with orphaned keys.
The problematic code:
Here is our patch, which fixed the leak for us:
Hope this helps! Thanks for all your work on Yoga.
Beta Was this translation helpful? Give feedback.
All reactions