Implement `Least Recently Used` eviction in `RequestCache` .
Is your feature request related to a problem? Please describe.
_cachedResponses doesn't have a limit on the number of _Cache's it can store and the expired _Cache is conditionally deleted, so a memory leak occurs.
Describe the solution you'd like
Implement an LRU algorithm.
Additional context
Assigned to @harisarang
@harisarang Maybe read up about TLRU- Time aware LRU scheme. I think TLRU scheme would be more relevant because LRU doesn't take Time to utilize (TLU) of the cached data into consideration.
Otherwise, for now, using the dcache package in cache function is fine.
Is this library considered safe for production use without this fix?
@CoryADavis I wouldn't recommend setting cachedSearchResultsTTL in production code yet.
Ahh, understood, this issue is only related to a feature that is off by default.
Thank you!
@happy-san can we trigger cache clear manually?
@o-artebiakin No, there's no way to clear the cache manually at the moment. Are you planning to use this feature in your app?