As an exercise, an LRU cache implemented in pure JS