moved cache functions to separate lib
Merge branch 'master', remote branch 'origin/master'