以前我写过一篇《清除指定squid缓存文件的脚本》,但在取URL时存在10%的错误率。如今找到一款老外的程序,可以批量清除某类URL的Squid缓存,支持正则表达式。

  下载网址:http://www.wa.apana.org.au/~dean/squidpurge/

  编译:
引用
wget http://www.wa.apana.org.au/~dean/sources/purge-20040201-src.tar.gz
tar zxvf purge-20040201-src.tar.gz
cd purge
make

  清除Squid缓存示例:
  1、清除 URL 以“.mp3”结尾的缓存文件(例如 http://www.s135.com/abc.mp3http://www.s135.com/01/a.mp3
引用
./purge -p localhost:80 -P 1 -se '\.mp3$'

  2、清除URL中包含s135.com的所有缓存:
引用
./purge -p localhost:80 -P 1 -se 's135.com'

  我喜欢将程序推到后台去执行,让它慢慢地去清Squid缓存,同时将输出内容记录到purge.log文件:
引用
./purge -p localhost:80 -P 1 -se 's135.com' > purge.log 2>&1 &


Tags: ,
技术大类 » Cache与存储 | 评论(6) | 引用(0) | 阅读(14156)
sbear Homepage
2007-11-7 15:21
性能如何?以前你说的用脚本的方式性能非常差哦。
张宴 回复于 2007-11-7 22:41
我的脚本速度比这个软件快,但是兼容性没它好。
ben
2008-6-19 17:51
我想问问 清除单个url的话是不是直接 purge -e url就行了?
ben
2008-10-24 11:55
不支持64位的系统
yyrjw Homepage
2008-11-18 15:33
请问下它的配置文件是那个,如果我的squid的配置文件不是/usr/local/squid/etc/squid.conf,我要怎么改它的路径
dongjie
2008-12-26 14:06
能有提供for windows版本的啊
louis vuitton uk Email Homepage
2011-11-23 08:52
This louis vuitton uk for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.You will easily notice the unfold zippers of this coach outlet store online. That is the decoration. There are some inside pockets for you as well. They are easy to match your clothes and to carry.Let us inspire your inner beauty with fine christian louboutin sale. Purse the elegance in bridal wedding. Enjoy the fashion.
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]