only cache repo if give file.