Refactoring for CacheManager