Simplify and optimize CacheManager implementation