From 8cff942dd63755f7d70a99b0f4a6df0c1344102b Mon Sep 17 00:00:00 2001 From: David Michaels Date: Thu, 7 Mar 2024 00:43:15 -0500 Subject: [PATCH] get_metadata nocache fix in structured_data --- dcicutils/structured_data.py | 7 ++++++- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dcicutils/structured_data.py b/dcicutils/structured_data.py index 63dd635bb..05a70aaba 100644 --- a/dcicutils/structured_data.py +++ b/dcicutils/structured_data.py @@ -687,7 +687,12 @@ def __init__(self, self._ref_lookup_strategy = ref_lookup_strategy else: self._ref_lookup_strategy = lambda type_name, value: StructuredDataSet.REF_LOOKUP_DEFAULT - self._ref_cache = {} if not ref_lookup_nocache else None + if ref_lookup_nocache is True: + self.get_metadata = self.get_metadata_nocache + self._ref_cache = None + else: + self.get_metadata = self.get_metadata_cache + self._ref_cache = {} self._ref_cache_hit_count = 0 self._ref_lookup_count = 0 diff --git a/pyproject.toml b/pyproject.toml index 4b6d36ca0..66e222069 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dcicutils" -version = "8.8.0.1b1" # TODO: To become 8.8.1 +version = "8.8.0.1b2" # TODO: To become 8.8.1 description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources" authors = ["4DN-DCIC Team "] license = "MIT"