Skip to content

Commit

Permalink
Remove unused api_clear_scan_history_cache method
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller committed Aug 9, 2024
1 parent cf550c5 commit a13600f
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions projects/plugins/protect/src/class-rest-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,19 +464,4 @@ public static function api_get_scan_history() {
$scan_history = Scan_History::get_scan_history( false );
return rest_ensure_response( $scan_history, 200 );
}

/**
* Clear the Scan_History cache for the API endpoint
*
* @return WP_REST_Response
*/
public static function api_clear_scan_history_cache() {
$cache_cleared = Scan_History::delete_option();

if ( ! $cache_cleared ) {
return new WP_REST_Response( 'An error occured while attempting to clear the Jetpack Scan history cache.', 500 );
}

return new WP_REST_Response( 'Jetpack Scan history cache cleared.' );
}
}

0 comments on commit a13600f

Please sign in to comment.