Koozali.org: home of the SME Server

How do I empty Squid Cache?

David

How do I empty Squid Cache?
« on: February 25, 2002, 03:49:36 PM »
I ran into a problem last night while updating my company's website. The site is hosted by our ISP and we use SME 5 for our local file Server/Gateway.

We needed to update our entire website so we deleted it. While we were getting ready to send the new files to the ISP's server one of my friends noticed that he could still view our entire website from our local lan. I verified the files were deleted from the server by using a dial-up account and trying to view the site. All I got was our "Maintance" notice we had placed there.

So we deleted and emptied his temp files and cookies to see if the site still was viewable, and it was.

Is SME caching that much? and if so in a case like this how do I or should I say which files do I purge on the SME box to refresh the files?

Anthony

Re: How do I empty Squid Cache?
« Reply #1 on: February 26, 2002, 11:33:20 AM »
http://www.squid-cache.org/Doc/FAQ/FAQ-7.html#ss7.5

7.5 How can I purge an object from my cache?
Squid does not allow you to purge objects unless it is configured with access controls in squid.conf. First you must add something like

        acl PURGE method PURGE
        acl localhost src 127.0.0.1
        http_access allow PURGE localhost
        http_access deny PURGE

The above only allows purge requests which come from the local host and denies all other purge requests.

To purge an object, you can use the client program:

        client -m PURGE http://www.miscreant.com/

If the purge was successful, you will see a 200 OK'' response:
        HTTP/1.0 200 OK
        Date: Thu, 17 Jul 1997 16:03:32 GMT
        Server: Squid/1.1.14

If the object was not found in the cache, you will see a 404 Not Found'' response:
        HTTP/1.0 404 Not Found
        Date: Thu, 17 Jul 1997 16:03:22 GMT
        Server: Squid/1.1.14

Anthony

Re: How do I empty Squid Cache?
« Reply #2 on: February 26, 2002, 11:40:44 AM »
Forgot to say, you will need to edit /etc/squid/squid.conf
with the access control values from my previous post.   Then restart squid
by running /etc/rc.d/rc7.d/S90squid restart.

Amir

Re: How do I empty Squid Cache?
« Reply #3 on: February 26, 2002, 03:05:01 PM »
Why not delete the squid cache folder and recreate it with squid -z (from memory)

Mike

Re: How do I empty Squid Cache?
« Reply #4 on: March 09, 2003, 12:21:14 PM »
I ran in to the same problem.
Was filling my homepage of a virtual domain that I am hosting for my mother on my E-Smith.
The new pages I added where unavailable while they where there.
I started checking.
No problems with linking to a wrong name or so.
Nothing worked until I rebooted my server.
Yes, I know, primitive problem solving but it works and is the fastest if you do not know where to look for and if it isn't a problem to bring your server down for 1 minute.
With my server it is not a problem because it is just for home use.

Arjay