Skip to content

Commit 7e8e590

Browse files
committed
Update cache.go
1 parent d026d8a commit 7e8e590

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/update/cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
const (
1111
cacheFileName = ".update-check"
12-
cacheDuration = 24 * time.Hour
12+
cacheDuration = 10 * time.Minute
1313
)
1414

1515
// CacheEntry stores the last update check result
@@ -51,7 +51,7 @@ func SaveCache(homeDir string, entry *CacheEntry) error {
5151
return os.WriteFile(path, data, 0644)
5252
}
5353

54-
// IsCacheValid returns true if cache is fresh (< 24h old)
54+
// IsCacheValid returns true if cache is fresh (< 10m old)
5555
func IsCacheValid(entry *CacheEntry) bool {
5656
return time.Since(entry.CheckedAt) < cacheDuration
5757
}

0 commit comments

Comments
 (0)