Skip to content

docs(api): explain response caching - #13875

Open
coyaSONG wants to merge 1 commit into
cli:trunkfrom
coyaSONG:docs/api-cache-behavior
Open

docs(api): explain response caching#13875
coyaSONG wants to merge 1 commit into
cli:trunkfrom
coyaSONG:docs/api-cache-behavior

Conversation

@coyaSONG

Copy link
Copy Markdown

Summary

  • document which REST and GraphQL requests --cache can cache
  • explain the supported duration units, reuse period, excluded response statuses, and request-specific cache keys
  • point users to gh config clear-cache for removing cached responses

Fixes #7482.

Validation

  • go test ./pkg/cmd/api
  • go test ./...
  • make lint with the CI-pinned golangci-lint v2.11.0
  • go run ./cmd/gh api --help
  • gofmt -d pkg/cmd/api/api.go
  • git diff --check

The wording was verified against the currently pinned github.com/cli/go-gh/v2 v2.13.0 cache implementation.


Written with OpenAI Codex assistance. The current implementation, rendered help, and validation results were reviewed before submission.

@github-actions github-actions Bot added external pull request originating outside of the CLI core team needs-triage needs to be reviewed labels Jul 14, 2026
@coyaSONG
coyaSONG marked this pull request as ready for review July 14, 2026 09:23
@coyaSONG
coyaSONG requested a review from a team as a code owner July 14, 2026 09:23
@coyaSONG
coyaSONG requested a review from BagToad July 14, 2026 09:23
@github-actions github-actions Bot added ready-for-review and removed needs-triage needs to be reviewed labels Jul 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your pull request! While it doesn't meet all of our standard requirements, it appears to be a small, focused contribution and has been routed to the team for review.

Note: We still encourage linking to an issue with the help wanted label when possible, as it helps us prioritize and track contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team ready-for-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Document API caching behavior

1 participant