Pull out the LRU cache to be in its own class and generify it accordingly.  Also added some test cases.