cache_dir must be a directory