Docunext

  • About

Code to Purge Varnish Caches

I use this script and the "expect" command line utility to purge Varnish caches on remote systems:

#!/usr/bin/expect
set 1 $argv
spawn telnet 192.168.1.99 6082
expect "Escape character is '^]'."
send "url.purge $1\n"
expect "200 0"
close

Cool, huh? Varnish is really great.

¥

Yearly Indexes: 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2015 2018 2019