How to implement a most-recently-used cache

Java Collections provide LinkedHashMap out of the box, which is well-suited to building caches. You probably don’t have this in Java ME, but you can grab the source code here: http://kickjava.com/src/java/util/LinkedHashMap.java.htm If you can’t just copy-paste it, looking at it should get you started implementing one for inclusion in your mobile app. The basic idea … Read more