From 597e2eeee856bfc1976eda2dc61baf1e53d6a5d4 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Sun, 16 Feb 2025 17:53:09 +0200 Subject: [PATCH] Include the cache option Signed-off-by: Yarden Shoham --- pkg/repo/chartrepo.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/repo/chartrepo.go b/pkg/repo/chartrepo.go index ffb503ca8..4ae653050 100644 --- a/pkg/repo/chartrepo.go +++ b/pkg/repo/chartrepo.go @@ -249,6 +249,13 @@ func WithInsecureSkipTLSverify(insecureSkipTLSverify bool) FindChartInRepoURLOpt } } +// WithIndexFileCache specifies the cache to use for index files +func WithIndexFileCache(indexFileCache *cache.Cache[*IndexFile]) FindChartInRepoURLOption { + return func(options *findChartInRepoURLOptions) { + options.IndexFileCache = indexFileCache + } +} + // FindChartInRepoURL finds chart in chart repository pointed by repoURL // without adding repo to repositories func FindChartInRepoURL(repoURL string, chartName string, getters getter.Providers, options ...FindChartInRepoURLOption) (string, error) {