From cf47cc67c0683228a60b81b07ad7c8a96875bdfc Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 29 Mar 2026 17:43:26 +0000 Subject: [PATCH] Clients: remove datapackage from persistent_storage ... (#6074) ... next time it gets written to. This makes loading peristent_storage faster in the future. --- Utils.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Utils.py b/Utils.py index 627235f249..cd4af275da 100644 --- a/Utils.py +++ b/Utils.py @@ -345,6 +345,9 @@ def persistent_load() -> Dict[str, Dict[str, Any]]: try: with open(path, "r") as f: storage = unsafe_parse_yaml(f.read()) + if "datapackage" in storage: + del storage["datapackage"] + logging.debug("Removed old datapackage from persistent storage") except Exception as e: logging.debug(f"Could not read store: {e}") if storage is None: @@ -369,11 +372,6 @@ def load_data_package_for_checksum(game: str, checksum: typing.Optional[str]) -> except Exception as e: logging.debug(f"Could not load data package: {e}") - # fall back to old cache - cache = persistent_load().get("datapackage", {}).get("games", {}).get(game, {}) - if cache.get("checksum") == checksum: - return cache - # cache does not match return {}