Skip to content

Commit

Permalink
Update agent/cache/cache.go
Browse files Browse the repository at this point in the history
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
  • Loading branch information
rboyer and Chris S. Kim authored Apr 19, 2022
1 parent e8b691e commit 0d1e0cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agent/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d1e0cc

Please sign in to comment.