This is an automated email from the ASF dual-hosted git repository. sbp pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push: new 3dbf640 Share a cache between ASFQuart and LDAP authorisers 3dbf640 is described below commit 3dbf640f9035c7345a2b4fd25a8b132c1fd13d44 Author: Sean B. Palmer <s...@miscoranda.com> AuthorDate: Wed Aug 6 19:59:29 2025 +0100 Share a cache between ASFQuart and LDAP authorisers --- atr/principal.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/atr/principal.py b/atr/principal.py index 8e6bede..e7da584 100644 --- a/atr/principal.py +++ b/atr/principal.py @@ -225,9 +225,12 @@ class Cache: return since_last_refresh > self.cache_for_at_most_seconds +cache = Cache() + + class AuthoriserASFQuart: def __init__(self): - self.__cache = Cache() + self.__cache = cache def is_member_of(self, asf_uid: str, committee_name: str) -> bool: return committee_name in self.__cache.member_of[asf_uid] @@ -256,7 +259,7 @@ class AuthoriserASFQuart: class AuthoriserLDAP: def __init__(self): - self.__cache = Cache() + self.__cache = cache def is_member_of(self, asf_uid: str, committee_name: str) -> bool: return committee_name in self.__cache.member_of[asf_uid] --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@tooling.apache.org For additional commands, e-mail: commits-h...@tooling.apache.org