implement more robust cache library
improve caching
Merge pull request #968 from control-center/bugfix/CC-49-3

Bugfix/cc 49 3