以前我写过一篇《清除指定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.zyan.cc/abc.mp3http://www.zyan.cc/01/a.mp3
引用
./purge -p localhost:80 -P 1 -se '\.mp3$'

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

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


Tags: ,



技术大类 » Cache与存储 | 评论(34) | 引用(0) | 阅读(46133)
Ieuan Ventura Email
2021-10-20 18:00
This is the reason and sign to Look outside the box of your ideas. To look on beyond the experience and work of others just to have a justification of your outcome. Great day dude.  สล็อต
shz Email
2022-6-27 14:40
You completely match our expectation and the variety of our information.  <a href="https://www.cloudzat.com/prezentar-reviews/">Prezentar Reviews</a>
shz Email
2022-8-3 19:14
It’s very informative and you are obviously very knowledgeable in this area. You have opened my eyes to varying views on this topic with interesting and solid content.  ClickBank Reviews
shz Email
2022-8-3 19:19
Through this post, I know that your good knowledge in playing with all the pieces was very helpful. I notify that this is the first place where I find issues I've been searching for. You have a clever yet attractive way of writing.  ClickBank Reviews
shz Email
2022-8-3 19:22
I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.  ClickBank Reviews
shzz Email
2022-8-3 19:23
it was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity..  Digital Real Estate Business
shz Email
2022-8-3 19:26
Excellent effort to make this blog more wonderful and attractive.  ClickBank Reviews
shz Email
2022-8-3 19:31
Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people..  ClickBank Reviews
shz Email
2022-8-3 19:34
There is definately a great deal to know about this subject. I like all of the points you've made.  ClickBank Reviews
shz Email
2022-8-3 19:37
I think about it is most required for making more on this get engaged  ClickBank Reviews
shz Email
2022-8-3 19:42
I am always searching online for articles that can help me. There is obviously a lot to know about this. I think you made some good points in Features also. Keep working, great job  ClickBank Reviews
shzz Email
2022-8-3 20:34
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!.  Digital Real Estate Business
Lucky cola
2024-2-7 15:10
Dive into the virtual world and embark on an unforgettable journey.  Lucky cola
分页: 2/2 第一页 上页 1 2 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]