Verified Commit bb4ac754 authored by Erick Hitter's avatar Erick Hitter
Browse files

Review feedback: clarify that cache helper is for internal use

parent dfac3343
...@@ -11,7 +11,9 @@ function is_internal_event( $action ) { ...@@ -11,7 +11,9 @@ function is_internal_event( $action ) {
/** /**
* Flush plugin's internal caches * Flush plugin's internal caches
*
* FOR INTERNAL USE ONLY - see WP-CLI; all other cache clearance should happen through the `Cron_Options_CPT` class
*/ */
function flush_internal_caches() { function _flush_internal_caches() {
return wp_cache_delete( Cron_Options_CPT::CACHE_KEY ); return wp_cache_delete( Cron_Options_CPT::CACHE_KEY );
} }
...@@ -12,7 +12,7 @@ class Cache extends \WP_CLI_Command { ...@@ -12,7 +12,7 @@ class Cache extends \WP_CLI_Command {
* @subcommand flush * @subcommand flush
*/ */
public function flush_internal_caches( $args, $assoc_args ) { public function flush_internal_caches( $args, $assoc_args ) {
$flushed = \Automattic\WP\Cron_Control\flush_internal_caches(); $flushed = \Automattic\WP\Cron_Control\_flush_internal_caches();
if ( $flushed ) { if ( $flushed ) {
\WP_CLI::success( __( 'Internal caches cleared', 'automattic-cron-control' ) ); \WP_CLI::success( __( 'Internal caches cleared', 'automattic-cron-control' ) );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment