helpers: repo: cache urls() (MR 2252)

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-10 04:34:59 +02:00 committed by Oliver Smith
parent e087e7c665
commit aedab4df73
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -51,8 +51,7 @@ def apkindex_hash(url: str, length: int=8) -> Path:
return Path(f"APKINDEX.{ret}.tar.gz") return Path(f"APKINDEX.{ret}.tar.gz")
# FIXME: this function gets called way too much, needs to be @Cache("user_repository", "mirrors_exclude")
# cached
def urls(user_repository=True, mirrors_exclude: List[str] = []): def urls(user_repository=True, mirrors_exclude: List[str] = []):
"""Get a list of repository URLs, as they are in /etc/apk/repositories. """Get a list of repository URLs, as they are in /etc/apk/repositories.