Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#3193) Add ability to ignore current http cache #3212

Conversation

AdmiringWorm
Copy link
Member

@AdmiringWorm AdmiringWorm commented Jun 14, 2023

Description Of Changes

The changes here will add a global option that can be used
by the user to ignore any existing http cache that has been
created prior to the execution of the current command.

Using the option will still create a new cache for the running
execution and reuse that created cache in the current context,
and can be reused normally when not using the argument in the
future.

Motivation and Context

To give the user the ability to bypass the cache when needed, as well as being able to bypass the cache in other products we have.

Testing

  1. Run choco outdated (To generate an up to date cache)
  2. Open up fiddler
  3. Run choco outdated --ignore-http-cache
  4. Verify requests are sent out for each package.
  5. Remove items in the folders C:\ProgramData\ChocolateyHttpCache and C:\Users\<YOUR_USERNAME>\.chocolatey\http-cache
  6. Run choco outdated --ignore-http-cache (To ensure that cache is created again, but from this call).
  7. Open up fiddler/clear requests in fiddler.
  8. Run choco outdated
  9. Verify no requests was sent out through fiddler.
  10. Repeat previous steps using choco search chocolatey instead of choco outdated.

Operating Systems Testing

  • Windows 10

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Fixes #3193

@AdmiringWorm AdmiringWorm self-assigned this Jun 14, 2023
@AdmiringWorm AdmiringWorm requested a review from gep13 June 14, 2023 13:01
@AdmiringWorm AdmiringWorm force-pushed the feature/3193-provide-option-for-chocolatey branch from fd6a4a5 to eeec83f Compare June 14, 2023 13:07
@AdmiringWorm AdmiringWorm force-pushed the feature/3193-provide-option-for-chocolatey branch 2 times, most recently from ad24ead to 3f7a866 Compare June 15, 2023 12:35
AdmiringWorm and others added 2 commits June 15, 2023 13:55
The changes here will add a global option that can be used
by the user to ignore any existing http cache that has been
created prior to the execution of the current command.

Using the option will still create a new cache for the running
execution and reuse that created cache in the current context,
and can be reused normally when not using the argument in the
future.
This was missed in the last release of Chocolatey CLI, and it is
important information to have.
@gep13 gep13 force-pushed the feature/3193-provide-option-for-chocolatey branch from 3f7a866 to 3b6ff3a Compare June 15, 2023 12:56
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit 06acb28 into chocolatey:develop Jun 15, 2023
@AdmiringWorm AdmiringWorm deleted the feature/3193-provide-option-for-chocolatey branch June 19, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide option for Chocolatey CLI commands to skip cached query results
2 participants