First round of CacheManager refactoring
Simplify and optimize CacheManager implementation
Merge pull request #727 from bhariharan/unstable

Simplify and optimize CacheManager implementation