The in-memory caches are not evictable, so it’s doing a shittier job that the OS could be doing automatically.
Login to reply
Replies (1)
But they are. Java has a gargabe collector that knows way more than the OS does and can optimize for when to call it. Then the two objects you use are WeakReference and SoftReference, Weak is used to tell the GC to clear as soon as no one else is using this object and Soft indicates that the GC should leave the object in memory and only clear on memory contention.