Skip to content

Add ability to always ignore the HTTP request cache when running Chocolatey CLI commands #3718

@gep13

Description

@gep13

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my request.

Is Your Feature Request Related To A Problem? Please describe.

Starting with Chocolatey CLI, a number of HTTP requests are cached, and the results reused in subsequent queries. It is possible to bypass this cache using the --ignore-http-cache option, but you have to explicitly set this option each time, there is no way to set this globally. It should be possible to opt into this globlaly, similar to what can be done with the allowGlobalConfirmation feature.

Describe The Solution. Why is it needed?

A new feature named alwaysIgnoreHttpCache should be added, which will do the same thing as the --ignore-http-cache option, but it means that it won't need to be provided to each command that is being executed.

Additional Context

There already exists a common option --ignore-http-cache that can be used to bypass the cache, but enabling the alwaysIgnoreHttpCache would remove the need to always explicitly opt into this.

A decision has been made to not include the reciprocal option for --use-http-cache, as that is deemed as not required. Again, as per the decision here, if there is enough demand, we can look to include this option, but for now, the workaround would be to disable the alwaysIgnoreHttpCache feautre.

Related Issues

Metadata

Metadata

Assignees

Labels

5 - ReleasedImprovementIssues that enhances existing functionality, or adds new features

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions