From 79bd251d876051bd5965f1e8bb7edb010596af16 Mon Sep 17 00:00:00 2001 From: Matyas Selmeci Date: Fri, 24 May 2024 21:45:12 -0500 Subject: [PATCH] Don't cache get_scitokens_conf_block() care must be taken when caching methods (see https://docs.python.org/3/faq/programming.html#how-do-i-cache-method-calls) and it's not called frequently enough to be worth it. --- src/webapp/data_federation.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/webapp/data_federation.py b/src/webapp/data_federation.py index f7ae234ef1..c95697e797 100644 --- a/src/webapp/data_federation.py +++ b/src/webapp/data_federation.py @@ -89,7 +89,6 @@ def __str__(self): return f"SciToken: issuer={self.issuer} base_path={self.base_path} restricted_path={self.restricted_path} " \ f"map_subject={self.map_subject}" - @functools.lru_cache(4) def get_scitokens_conf_block(self, service_name: str): if service_name not in [XROOTD_CACHE_SERVER, XROOTD_ORIGIN_SERVER]: raise ValueError(f"service_name must be '{XROOTD_CACHE_SERVER}' or '{XROOTD_ORIGIN_SERVER}'")