varnish wordpress

Don’t mix: Varnish and Vary: User-Agent

W3 Total Cache sends “Vary: User-Agent” when using Browser Cache. This effectively renders Varnish useless, i.e. brings cache hit rate extremly down because a copy is saved for every User-Agent out there (Ex.: Mozilla, Webkit, etc.). You can come by that issue by either removing the according lines in your .htaccess file, tuning Apache to not send the User-Agent, or, by ignoring the User-Agent in your varnish configuration. We went with the method of adding configuration to our Varnish.

WordPress Setup Using W3 Total Cache With Varnish & Cloudflare

wordpressのW3 Total Cache pluginを使ってvarnishのキャッシュをpurgeする

http://code.tutsplus.com/tutorials/optimizing-wordpress-with-varnish-and-w3-total-cache--cms-21136

General Settings -> Reverse Proxy 
Enable varnish cache purging
Varnish servers: 127.0.0.1