refactoring caching, introduced heartbeat to reflect cmdl changes