CacheManager refactoring to make its API clearer