an LRU cache example courtesy of Oliver Lorenz