Support `--limit-output` for `choco cache list` (and other cache subcommands?)
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [X] I have verified this is the correct repository for opening this issue.
- [X] I have verified no other issues exist related to my request.
### Is Your Feature Request Related To A Problem? Please describe.
Currently the output for `choco cache list` and the other cache subcommands is the same regardless of whether `--limit-output` is used.
```
PS> choco cache list
Chocolatey v2.1.0 Business
System HTTP Cache
We found 7 cached sources.
We found 959 cached items for all sources, where 959 items have expired.
User HTTP Cache
We found 5 cached sources.
We found 372 cached items for all sources, where 372 items have expired.
PS> choco cache list -r
System HTTP Cache
We found 7 cached sources.
We found 959 cached items for all sources, where 959 items have expired.
User HTTP Cache
We found 5 cached sources.
We found 372 cached items for all sources, where 372 items have expired.
```
For automation tooling that might want to interact with the cache functionality, it would be useful to include `--limit-output` parseable output to make those interactions simpler.
### Describe The Solution. Why is it needed?
If `--limit-output` is passed, formatting and informational text should be omitted, and any useful information should be represented in similar format to existing usages of `--limit-output` -- as a pipe-delimited table.
Perhaps something like this for `choco cache list` (using the same information from the above output):
```
Location|Items|Expired|Sources
System|372|372|7
User|372|372|5
```
### Additional Context
_No response_
### Related Issues
_No response_
Contributor guide
Research direction
Start at the `choco cache list` entry point and inspect the other cache subcommands, then compare their behavior with existing `--limit-output` usages. Done means cache output omits formatting and informational text when the flag is passed and provides useful data in a consistent pipe-delimited format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100