DI violation in Cache class fix