From 68c910d2a264b68870bc84a909df6c085dd281f8 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sat, 18 May 2024 22:29:22 -0600 Subject: imworkingon: Only refresh git repos once an hour --- cmd/generate/gitcache.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/generate/gitcache.go b/cmd/generate/gitcache.go index 7caf024..844408d 100644 --- a/cmd/generate/gitcache.go +++ b/cmd/generate/gitcache.go @@ -5,6 +5,7 @@ import ( "os" "os/exec" "strings" + "time" "git.mothstuff.lol/lukeshu/eclipse/lib/gitcache" ) @@ -12,7 +13,8 @@ import ( var gitFetched = map[string]struct{}{} var gitCache = &gitcache.Cache{ - Dir: ".git-cache", + Dir: ".git-cache", + MinPeriod: 1 * time.Hour, } func withGit(u string, fn func(dir string) error) error { -- cgit v1.2.3-2-g168b