Archive | May, 2011

13 May 2011 ~ 0 Comments

A Simple LRU Cache

Recently, while working on a module has a need of very light weight fixed size LRU cache. There are definitely lot of caching solutions around, but decided to try a simple Map based solution. Surprisingly, the solution using LinkedHashMap turned out to be simplest. Here is the snippet. Removed all additional validation and other stuff [...]

Continue Reading