Skip to content

Commit 61ae512

Browse files
kikkomepEttoreM
authored andcommitted
fix(models): reconfigure HTTP requester in place instead of resetting it
1 parent 48e4eda commit 61ae512

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

rocrate_validator/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,9 +2699,9 @@ def __post_init__(self):
26992699
"Offline mode enabled without a persistent cache path: "
27002700
"all HTTP-backed resources will fail unless pre-populated."
27012701
)
2702-
# Reset any previously initialized singleton so new settings take effect.
2703-
HttpRequester.reset()
2704-
# initialize the HTTP cache
2702+
# Re-apply the cache settings to the HTTP requester. ``initialize_cache``
2703+
# reconfigures the existing singleton in place (rather than dropping it),
2704+
# so new settings take effect without discarding state set on the instance.
27052705
HttpRequester.initialize_cache(
27062706
cache_path=str(self.cache_path) if self.cache_path is not None else None,
27072707
cache_max_age=self.cache_max_age,

0 commit comments

Comments
 (0)