Extract the cache manager instantiation to a method