Would it be good if I add a property that allows clearing cache of a post as below?
wp fastest-cache clear --post_id=3
-
This reply was modified 1 year, 11 months ago by Emre Vona.
@emrevona
wp fastest-cache clear --post_id=3
Yes, Its good looks like “w3tc” !
Currently there is no such feature, so we should delete the cache files in the cache folder directly, right?
I will add and let you know.
I added the feature. you need to delete wp fastest cache and download the following version to get the latest changes.
https://downloads.wordpress.org/plugin/wp-fastest-cache.zip
@emrevona
thank you.
I got the latest version.
But wp fastest-cache clear --post_id=3
doesn’t seem to work.
Other than all
, it is self::wrong_usage();
.
cli.php
if(isset($args[0])){
if($args[0] == "all"){
if(isset($args[1]) && isset($args[2])){
if($args[1] == "and" && $args[2] == "minified"){
WP_CLI::line("Clearing the ALL cache...");
$GLOBALS['wp_fastest_cache']->deleteCache(true);
WP_CLI::success("The cache has been cleared!");
}else{
self::wrong_usage();
}
}else{
WP_CLI::line("Clearing the ALL cache...");
$GLOBALS['wp_fastest_cache']->deleteCache();
WP_CLI::success("The cache has been cleared!");
}
}else{
self::wrong_usage();
}
}else{
self::wrong_usage();
}
please download the following file and replace with /wp-content/plugins/wp-fastest-cache/inc/cli.php
https://plugins.trac.wordpress.org/browser/wp-fastest-cache/trunk/inc/cli.php?format=txt
@emrevona
I confirmed it. Thank you for your prompt response!
@emrevona
By the way, is this the same as rm
the cache files (wp-content/cache/*
) individually?
Is the cache cleared correctly even if I rm the cache files individually?