• Resolved Adam

    (@dahamsta)


    Hi, in the FAQ it says “If your Varnish server doesn’t doesn’t understand the wildcard, you can configure it to check for the header.”, how would I go about doing this for Varnish 4? I’ve seen a few solutions for similar problems, but they all seem to look for a BAN header.

    I presume a full cache purge only purges for the relevant site, it doesn’t actually purge for other sites Varnish is caching for?

    https://ww.wp.xz.cn/plugins/varnish-http-purge/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The essence of the full purge is that you’re sending this to your sever:

    curl -X PURGE "http://example.com/.*"

    That says ONLY purge that domain. And from what I read on https://www.varnish-cache.org/docs/4.0/users-guide/purging.html it should still work. Do you know how to purge manually on your current setup?

    Thread Starter Adam

    (@dahamsta)

    I do, but I need to enable “Purge Varnish” button for my end users, so they can purge for theme changes and I don’t have to give them system access. It isn’t working currently, so I assume I need to enable regex requests in the VCL, but I’ve no idea how to do that for v4.

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Let me rephrase: Do you know how and, if so, how do you do it manually on your sevrer? 🙂 What command?

    I assume I need to enable regex requests in the VCL, but I’ve no idea how to do that for v4.

    That’s outside the help I can offer right now. I didn’t write our Varnish rules and I’m not yet up to translating them to 4.

    Thread Starter Adam

    (@dahamsta)

    I assume I would be sending the equivalent of the above, which I assume in turn is the equivalent of what’s mentioned in the FAQ:

    Why isn’t the whole cache purge working?

    The plugin sends a PURGE command of /.* and X-Purge-Method in the header with a value of regex. If your Varnish server doesn’t doesn’t understand the wildcard, you can configure it to check for the header.

    It’s the last sentence I’m trying to resolve. Obviously my Varnish server doesn’t understand the wildcard, as it’s not doing a full purge when I click the Purge Varnish button. I was hoping someone here would know how to to configure Varnish 4 to recognise that purge request.

    Thread Starter Adam

    (@dahamsta)

    Got it, aahan’s excellent config has been updated to V4 since I last looked, he has it covered in purge.vcl.

    https://github.com/aahan/wp-server-config

    awesome!! that vcl is a work of art compared to others I’ve seen and *especially compared to what I’m capable of!!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Full cache purge’ is closed to new replies.