-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
CLI Commands for Cachify #165
Conversation
cache-size command added flush cache by id function added flush cache by page function added
Related Issue: #164 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I've identified one issue to resolve, but it's a small one.
now using `cli_init` instead of `init` obsolete check cli support removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested your changes locally and noticed that all-methods
argument is not working. Then I have one more suggestion, but otherwise everything seems to work fine!
fix: --all-methods flush not flushing all caches improvement: more specific output for flush command
Whitespace formatting needs to be fixed as well for consistency (tabs should be used instead of spaces), but I'll merge your PR as it is and fix that later. Thanks for your effort! |
This PR adds basic CLI Commands for Cachify:
Flush Command
wp cachify flush
This command flushes the total cache.
This is equal to the
Cachify::flush_total_cache();
Available Options
The flush command accepts the
--all-methods
option to flush the cache of all methods.This is euqal to
Cachify::flush_total_cache( true );
Cache Size Command
wp cachify cache-size
This command returns the current cache size.
Example Output:
The cache size is 120188 bytes
Available Options
The Cache Size command accepts the
--raw
option to return only the cache size in bytes.Example Output:
120188