From 693a887c5cf6b370246a51cfc4d749da602e6d3b Mon Sep 17 00:00:00 2001 From: JenTing Date: Thu, 22 Aug 2024 00:10:21 +0800 Subject: [PATCH] fix: cache helm-index in Redis cluster (#12314) (#19530) * fix: cache helm-index in Redis cluster Signed-off-by: JenTing Hsiao * Update repository.go Fix order Signed-off-by: Dan Garfield --------- Signed-off-by: JenTing Hsiao Signed-off-by: Dan Garfield Co-authored-by: Dan Garfield --- reposerver/repository/repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index 23196528faddab..80e89c29edce97 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -2508,7 +2508,7 @@ func checkoutRevision(gitClient git.Client, revision string, submoduleEnabled bo } func (s *Service) GetHelmCharts(ctx context.Context, q *apiclient.HelmChartsRequest) (*apiclient.HelmChartsResponse, error) { - index, err := s.newHelmClient(q.Repo.Repo, q.Repo.GetHelmCreds(), q.Repo.EnableOCI, q.Repo.Proxy, q.Repo.NoProxy, helm.WithChartPaths(s.chartPaths)).GetIndex(true, s.initConstants.HelmRegistryMaxIndexSize) + index, err := s.newHelmClient(q.Repo.Repo, q.Repo.GetHelmCreds(), q.Repo.EnableOCI, q.Repo.Proxy, q.Repo.NoProxy, helm.WithIndexCache(s.cache), helm.WithChartPaths(s.chartPaths)).GetIndex(true, s.initConstants.HelmRegistryMaxIndexSize) if err != nil { return nil, err }