Skip to content

Add support for clearing cache #7242

@andyfeller

Description

@andyfeller

Describe the feature or problem you’d like to solve

When using gh ext browse to look for GH CLI extensions, gh creates and uses a cache ($TMPDIR/gh-cli-cache) through cli/go-gh that holds information about repositories with gh-extension topic. It is occasionally necessary to clear this cache especially when troubleshooting GH CLI extension browse experience, however these details are obscure, leading to wasted time digging into the guts or phoning a CLI friend to figure it out.

Proposed solution

I can see several possible solutions of various degrees:

  1. Documentation explaining the gh-cli-cache and repercussions of deleting it
  2. Additional flag to gh ext browse that allows clearing browse specific cache information
  3. Additional command to gh that allows clearing all cache

Additional context

  1. Create repository without gh-extension topic
  2. gh ext browse, confirming repository does not show up
  3. Update repository with gh-extension topic
  4. gh ext browse, confirming repository does not show up due to cache
  5. Delete cache directory, rm -rf $TMPDIR/gh-cli-cache
  6. gh ext browse, confirming repository shows up

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions