addedd CCACHE dirs, code refactoring