def set_cached_mtimes(self, root_folder, first_commit, mtimes, use_files_relpaths):
        location = os.path.join(root_folder, ".git", "harpoon_cached_mtimes.json")
        sorted_use_files_relpaths = sorted(use_files_relpaths)
        current = self.get_cached_mtimes(root_folder, use_files_relpaths, get_all=True)

        found = False
        for item in current:
            if sorted(item.get("use_files_relpaths", [])) == sorted_use_files_relpaths:
                item["mtimes"] = mtimes
                item["commit"] = first_commit
                found = True
                break

        if not found:
            current.append({"commit": first_commit, "mtimes": mtimes, "use_files_relpaths": sorted_use_files_relpaths})

        try:
            log.info("Writing harpoon cached mtimes\tlocation=%s", location)
            with open(location, "w") as fle:
                json.dump(current, fle)
        except (TypeError, ValueError, __HOLE__) as error:
            log.warning("Failed to dump harpoon mtime cache\tlocation=%s\terror=%s", location, error)
dataset/ETHPy150Open realestate-com-au/harpoon/harpoon/ship/context.py/ContextBuilder.set_cached_mtimes