Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Varnish HTTP purge

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 2 Posters 2.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pbo808
      last edited by

      Anyone have any ideas how I can get the HTTP method of purging working for Varnish as mentioned here: https://www.varnish-cache.org/docs/2.1/tutorial/purging.html ?  The current custom VCL functions don't seem to allow this.  I'm new to Varnish and VLC, so any help would be appreciated!  (Varnish seems light years ahead of Squid that I had been using!)

      Thanks!

      1 Reply Last reply Reply Quote 0
      • P
        pbo808
        last edited by

        Looking at http://blog.feryn.eu/2010/11/varnish-cache-purging/ I added the following to "vcl_recv_early" and basic tests seem to show it working!

        if(req.request == "DELETE") {
           purge_url(req.url);
           error 200 "Purged";
        }
        

        I changed the verb to "DELETE" to test in Fiddler on Windows since it doesn't allow custom verbs like "PURGE".

        I'd love to hear better/other approaches.  Thanks!

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by

          Purge is on the TODO list.
          Today varnish setup at pfsense respects client CTRL+F5 and no-cache directives.

          If you look at varnish docs, you will see that PURGE is done only by administrators and also can be done by console.

          If you realy need this at pfsense package gui, let me know how you need this and I Tell you if i can inplement or not.

          Treinamentos de Elite: http://sys-squad.com

          Help a community developer! ;D

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.