Skip to content

Commit

Permalink
reduce gitdb cache to 2min (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
wencong-zhang authored Apr 7, 2022
1 parent 7a24913 commit 12cf06d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/gitdb/goget/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (g *GitCheckout) GetFile(ctx context.Context, branch string, path string) (
if item, exists := g.cache.Get(cacheKey); exists {
if v, ok := item.(getFileCacheValue); ok {
g.tracing.AttachTag(ctx, "cache.hit", true)
if time.Since(v.creationTime) > time.Minute*15 {
if time.Since(v.creationTime) > time.Minute*2 {
g.log.Debug(ctx, "old cache hit")
g.cache.Remove(cacheKey)
} else {
Expand Down

0 comments on commit 12cf06d

Please sign in to comment.