How to Build a Java LRU Cache in 5 Lines
To build a simple Least Recently Used (LRU) cache in Java, extend the standard LinkedHashMap with accessOrder set to true and override the removeEldestEntry method. While this standard library approac
doogal.dev5 min read