You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, entries are never removed from the cache and there is no limit on the number of entries in the cache. Thus, it's effectively a memory leak.
A simplistic minimal way to address this would be:
Add a constructor parameter for the maximum number of items in the ConcurrentHashMap cache
Add a constructor parameter for an eviction algorithm, which will be invoked with the cache whenever the cache's size exceeds the maximum
The text was updated successfully, but these errors were encountered:
Currently, entries are never removed from the cache and there is no limit on the number of entries in the cache. Thus, it's effectively a memory leak.
A simplistic minimal way to address this would be:
ConcurrentHashMap cache
cache
whenever the cache's size exceeds the maximumThe text was updated successfully, but these errors were encountered: