There is plugin for that, or you can grab his code and add in Your functions.php etc..
/* Admin bar link to delete WP Super Cache's Cache. Stolen from wp-super-cache-clear-cache-menu, https://apasionados.es/ */
function only_show_option_if_wp_super_cache_is_active() {
if (is_plugin_active('wp-super-cache/wp-cache.php')) {
function clear_all_cached_files_wpsupercache() {
global $wp_admin_bar;
if (!is_super_admin() || !is_admin_bar_showing())
return;
$args = array(
'id' => 'delete-cache-completly',
'title' => 'Clear WP Super Cache',
'href' => wp_nonce_url(admin_url('options-general.php?page=wpsupercache&wp_delete_cache=1&tab=contents'), 'wp-cache'),
'parent' => '',
'meta' => array(
'title' => 'Clear all cached files of WP Super Cache'
)
);
$wp_admin_bar->add_menu($args);
}
add_action('wp_before_admin_bar_render', 'clear_all_cached_files_wpsupercache', 999);
}
}
add_action('admin_init', 'only_show_option_if_wp_super_cache_is_active');