create and use cache_dir