From 0d1e0cc587801dad0f91ff088bdc8fadf00db4a6 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" <4903+rboyer@users.noreply.github.com> Date: Tue, 19 Apr 2022 10:17:20 -0500 Subject: [PATCH] Update agent/cache/cache.go Co-authored-by: Chris S. Kim --- agent/cache/cache.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/cache/cache.go b/agent/cache/cache.go index 477df335e703a..9f49ab2cf2997 100644 --- a/agent/cache/cache.go +++ b/agent/cache/cache.go @@ -557,7 +557,8 @@ func (c *Cache) fetch(key string, r getOptions, allowNew bool, attempt uint, ign // If we already have an entry, it is actively fetching, and we don't need // to revalidate the cache, then return the currently active waiter. if ok && entry.Fetching { - // If we need to revalidate, return immediately + // If we need to revalidate, return with a closed channel + // so the caller will immediately retry the cache if r.Info.MustRevalidate { ch := make(chan struct{}) close(ch)