how to flush website from squid cache

Taking care of your Linux box.
Post Reply
JazzyB
Lance Naik
Posts: 22
Joined: Mon Nov 12, 2007 10:59 am

how to flush website from squid cache

Post by JazzyB »

Dear All

I need to know about how i can flush some particular website entries from my squid cache. Like i have website which has news section in it. my proxy is showing me yesterdays website index page but if i bypass squid and browse website directly through router, my browser show me last updated page.
Is there any possibility that squid always get latest page against that website or squid donot cache that website or is there any process in squid that clear website entries from cache.

Thanks
osama
Havaldaar
Posts: 117
Joined: Fri Aug 22, 2008 9:08 am

Post by osama »

I have not tried this but u try

./squidclient -h localhost -p 80 -m PURGE http://www.example.com


source

http://www.mail-archive.com/squid-users ... 46934.html
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear JazzyB,
Salam,

FYI, http://www.linuxpakistan.net/forum2x/vi ... 3956#20287

Best Regards.
Farrukh Ahmed
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

Like i have website which has news section in it. my proxy is showing me yesterdays website index page but if i bypass squid and browse website directly through router, my browser show me last updated page.
if you have messed with your refresh entries, change them back to the defaults.
Is there any possibility that squid always get latest page against that website or squid donot cache that website or is there any process in squid that clear website entries from cache.
yes, it's possible.

Code: Select all

acl ignoresites dstdomain .bbc.co.uk .cnn.com news.google.com.pk
no_cache deny ignoresites
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
JazzyB
Lance Naik
Posts: 22
Joined: Mon Nov 12, 2007 10:59 am

acl working

Post by JazzyB »

Thanks lambda

Acl working. Can you tell me one more thing. how can i check whether i am getting web page and all its contents from squid cache or from hosted server. Is there any command.

8)
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

look in the logs when you try to load a page from the site. if you see a HIT, it's from the cache.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

Code: Select all

tail -f /var/log/squid/access.log |grep HIT
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

better yet, use this script.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Post Reply