fix cache_dir type problem