Skip to content

Commit

Permalink
Merge branch 'pr/speedup' into itb
Browse files Browse the repository at this point in the history
* pr/speedup:
  Cache parse_authz() results too
  • Loading branch information
matyasselmeci committed May 25, 2024
2 parents 3c18e7a + 428cac2 commit b706765
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/webapp/data_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def _parse_authz_str(authz: str) -> Tuple[AuthMethod, Optional[str]]:
return NullAuth(), f"Unknown authz list entry {authz}"


@functools.lru_cache(1024)
def parse_authz(authz: Union[str, Dict]) -> Tuple[AuthMethod, Optional[str]]:
"""Return the instance of the appropriate AuthMethod from a single item in an authz list for a namespace.
Expand Down

0 comments on commit b706765

Please sign in to comment.