WordPress.org

Forums

Varnish HTTP Purge
[resolved] no purging (2 posts)

  1. RavanH
    Member
    Posted 3 years ago #

    Editing and saving posts and pages does not seem to purge the Varnish cache. At least, viewing my test site http://vps11611.ovh.net/ via web-sniffer.com, shows it is being served the cached (old) post.

    In my /etc/varnish/default.vcl :

    ...
    # Purge ACL
    acl purge {
            # Only localhost can purge my cache
            "127.0.0.1";
            "localhost";
    }
    ...

    Do I need something else to get this working?

    Thanks :)

    http://wordpress.org/extend/plugins/varnish-http-purge/

  2. Pothi
    Member
    Posted 3 years ago #

    The default.vcl needs a way to purge a particular request. For example, in my default.vcl, I have the following code to purge...

    sub vcl_recv {
      	if (req.request == "PURGE") { return (lookup); }
    }
    
    sub vcl_hit {
    	if (req.request == "PURGE") { purge; }
    	return (deliver);
    }
    
    sub vcl_miss {
    	if (req.request == "PURGE") { purge; }
    	return (fetch);
    }

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