varnish清url缓存的shell

闲来无事,折腾折腾:

# cat clearcache.sh #!/bin/shclean_cache(){/usr/local/varnish/bin/varnishadm -T 127.0.0.1:6082 ban "req.http.host ~ $domain$ && req.url ~ $url$"return}read -p "Enter you domain name(Example:www.example.com):" domainread -p "Enter you URL:" urlif clean_cache domain url;then   echo "cache is clean,now URL is update"else   echo "URL clean faild"fi

执行:

# ./clearcache Enter you domain name(Example:www.example.com):www.xueui.cnEnter you URL:/download/ps-plug/ps-remove-unused-fx.htmlcache is clean,now URL is update
varnish清url缓存的shell

相关文章:

你感兴趣的文章:

标签云: