Skip to content

Commit

Permalink
feat: decrease cache TTL to 2 hours (from 24 hours)
Browse files Browse the repository at this point in the history
  • Loading branch information
szkiba committed Jun 26, 2024
1 parent a3f31ac commit 0e59386
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/ghext/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net/http"
"time"

"github.com/cli/go-gh/v2/pkg/api"
"github.com/cli/go-gh/v2/pkg/auth"
Expand Down Expand Up @@ -71,6 +72,7 @@ func newHTTPClient() (*http.Client, error) {
}

opts.EnableCache = true
opts.CacheTTL = 2 * time.Hour

return api.NewHTTPClient(opts)
}

0 comments on commit 0e59386

Please sign in to comment.