protected function setupFlushCache()
    {
        do_action("before_theme_setup_flush_cache");

        # Add flush cache link to admin bar
        add_action('admin_bar_menu', function ($wp_admin_bar) {
            $args = array(
                'id' => 'cache_flush_link',
                'title' => 'Flush cache',
                'href' => get_admin_url() . '?flushCache',
                'meta' => array('class' => 'cache-flush-link')
            );
            $wp_admin_bar->add_node($args);
        }, 999);

        # Force cleat all cache, otherwise just remove old
        if (isset($_GET["flushCache"]) && is_admin() && is_user_logged_in()):
            $this->flushCache();
            $this->doNotice(__("Cache has been flushed."));
        endif;

        do_action("after_theme_setup_flush_cache");
    }