def METHOD_NAME(url: str, target_json: Path, arch: str):
    try:
        contents = download_cache[url]
    except KeyError:
        target_json, arch = original_download(url, target_json, arch)
        # Save in the cache.
        with target_json.open("rb") as stream:
            download_cache[url] = stream.read()
    else:
        # Write cache contents to file.
        with target_json.open("wb") as stream:
            stream.write(contents)
    return target_json, arch