Skip to content

Commit

Permalink
use fresh time for cache entry
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Proctor <[email protected]>
  • Loading branch information
tvoran and tomhjp authored Apr 14, 2022
1 parent ff5feca commit 0f14a49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fileutil/caching_file_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (r *CachingFileReader) ReadFile() (string, error) {
}
r.cache = cachedFile{
buf: string(buf),
expiry: now.Add(r.ttl),
expiry: r.currentTime().Add(r.ttl),
}

return r.cache.buf, nil
Expand Down

0 comments on commit 0f14a49

Please sign in to comment.