Varnish HTTP Purge
Just works (6 posts)

  1. ejehardenberg
    Posted 1 year ago #

    I tried other varnish plugins before this, but they didn't work. this one worked right off the bat! Great work :)

    I ended up adding my own function + filter into the code in order to have the purge right now button in my admin bar. Easy:

    In init:
    add_action('admin_bar_menu', array($this, 'varnish_right_now_admin_bar_link'), 100);

    Within the class

    function varnish_right_now_admin_bar_link($admin_bar){
            $admin_bar->add_menu( array(
                'id'    => 'purge-varnish-cache-all',
                'title' => 'Purge Varnish',
                'href'  => wp_nonce_url(admin_url('?vhp_flush_all'), 'varnish-http-purge'),
                'meta'  => array(
                    'title' => __('Purge your varnish cache'),
  2. Are you looking at my dev code? Actually the reason I'm holding off on it is because I'm trying to suss out a sane way to handle that flush on multisite subfolders (right now, if the main site flushes, it'll flush ALL sites on a subfodler network, which is bad....)

  3. ejehardenberg
    Posted 1 year ago #

    I didn't look at the dev code, it was from the one I downloaded from wordpress.org

    I noticed that there was a commented out admin_bar hook after I added in my function.

    Should that be uncommented in the version downloaded from wordpress.org?

  4. I was making a joke :) No, don't use the commented out thing, it's not working right since I'm trying to get some multisite-ability in with it too. Yours is perfect.

  5. I should say, when version 3.4 comes out (hopefully this week!) it'll have an admin bar button that will actually work no mater what page you're on, without redirecting you to the dashboard.

    Also it'll be a little more robust (aka functional) for Multisite.

  6. ejehardenberg
    Posted 1 year ago #

    Awesome :) Looking forward to more of the great work you're doing

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Varnish HTTP Purge
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.