From: Zack Cerza Date: Wed, 22 Nov 2023 01:54:08 +0000 (-0700) Subject: repo_utils.ls_remote: Memoize X-Git-Tag: 1.2.0~61^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=36d937121b016ca96da74a20de46df6c398afe6d;p=teuthology.git repo_utils.ls_remote: Memoize Signed-off-by: Zack Cerza --- diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index 93ee225a3..03321fbf1 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -1,3 +1,4 @@ +import functools import logging import os import re @@ -56,6 +57,7 @@ def build_git_url(project, project_owner='ceph'): return url_templ.format(project_owner=project_owner, project=project) +@functools.lru_cache() def ls_remote(url, ref): """ Return the current sha1 for a given repository and ref