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

cache-control CLI tweaks #7

Closed
adorton-adobe opened this issue Jan 15, 2021 · 2 comments · Fixed by #8
Closed

cache-control CLI tweaks #7

adorton-adobe opened this issue Jan 15, 2021 · 2 comments · Fixed by #8
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@adorton-adobe
Copy link
Contributor

adorton-adobe commented Jan 15, 2021

CLI options for cache-control need some tweaks -

  • --clear is misidentified as an option in the usage text when it should be in the "flags" section. I believe this is because in the Opts struct it is defined as Option<bool>. Making it a plain bool with a default of false should resolve the issue. We won't run into the same issues we did with --ssl because there is nothing in the config that this option overrides.
  • We should add an option to specify the path of the DB file to maintain consistency with the update I proposed in Command-line option to define cache DB path #5.
  • We should add docstrings to --export-file and --import-file noting that these options are not yet implemented
@adorton-adobe adorton-adobe added the enhancement New feature or request label Jan 15, 2021
@adorton-adobe adorton-adobe added this to the 0.9.0 milestone Jan 15, 2021
@adorton-adobe adorton-adobe self-assigned this Jan 15, 2021
@adorton-adobe
Copy link
Contributor Author

adorton-adobe commented Jan 15, 2021

Regarding cache-control --clear (item 1):

The strongest reason to leave this as-is is that it sort of provides an extra layer of confirmation for performing a dangerous action. However, I think it may make more sense to follow the typical pattern of prompting the user for confirmation and perhaps even accepting a -y option to bypass that confirmation prompt.

$ ./frl-proxy cache-control --clear
Are you sure you want to clear the cache? This operation cannot be undone [yN]: Y
cache-control: Cache has been cleared
$ ./frl-proxy cache-control --clear -y
cache-control: Cache has been cleared

@adobeDan
Copy link
Contributor

Great proposal! I completely agree with your reasoning, @adorton-adobe.

adobeDan added a commit that referenced this issue Jan 16, 2021
Cache control cli tweaks from @adorton-adobe, fixes #5 and fixes #7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants