Refactor Cache class and add tests