Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug Varnish HTTP Purge

One of the Wordpress blogs I'm giving maintenance is not purging the cache using the plugin Varnish HTTP Purge. Whether using Varnish Cache Purge button or when we edit a post.

In order to know the cause of the problem, I would like to know a way to check if the purge request is reaching the Varnish server, maybe using varnishlog command.

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

like image 978
Tomir Schmite Jr. Avatar asked Dec 19 '13 17:12

Tomir Schmite Jr.


2 Answers

Varnish 4.0

varnishlog -g request -q 'ReqMethod eq "PURGE"'
like image 89
kervin Avatar answered Nov 07 '22 21:11

kervin


Varnish 3.x

varnishlog -d -c -m RxRequest:PURGE

That will output any of the purges in memory. And without -d it will output only current requests:

varnishlog -c -m RxRequest:PURGE

From man varnishlog:

-d Process old log entries on startup. Normally, varnishlog will only process entries which are written to the log after it starts.

like image 20
Tomir Schmite Jr. Avatar answered Nov 07 '22 23:11

Tomir Schmite Jr.