Inject build_dir and cache_dir as config; work in cache_dir