Implement LRU cache with tests.