Add lru-cache to replace custom implementation

cc @willwhite