I'm implementing an image cache that can will be heavy on memory usage so I'm keeping a SoftReference to image data so the GC can collect them under memory pressure.
However, each entry has an age so is there a way to tell a GC (which one?) to collect older entries instead of "random" ones?
I guess I could kind of do it myself by keeping strong references and removing entries on low freeMemory(), but that's kind of an "indirect free" (GC still has to kick-in to actually free the memory).