Refactored DB Lookup operators and Cache Manager

This change improves DB Cache Lookup operators and Cache Manager. 
Please pull in this request.