-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Milestone
Description
From #11203 :
Seems like the LinkedHashLruCacheTest tests should use cache.fitToLimit() at least some of the time (or maybe it deserves its own test case).
| this.evictionListener = new SizeHandlingEvictionListener(evictionListener); |
Having the evictionListener handle decrementing
estimatedMaxSizeBytesseems like unnecessary complexity that should be eliminated.
| // new size is larger no need to do cleanup |
The reason given in the comment only describes what happens when it is called from this class, not from RlsAsyncLruCache. The comment should probably just be removed as obvious, but could be changed to
there is space available so no need to do cleanup
s/until new size limit/until the size of all entries fits within the limit/