caching: respect the repo_dir paramater