Refactored caching to use ConfigCache.