fixed clang openmp
move cache and dbcache into separate file