Refactoring `cache{}` to use an `LRU` with a max size of 500