Re: [squid-users] Purge cache

From: Colin Campbell <sgcccdc@dont-contact.us>
Date: Wed, 18 Jul 2001 09:09:34 +1000 (EST)

Hi,

On Tue, 17 Jul 2001, Eliyah Lovkoff wrote:

> FAQ says that in order to purge all cache acl must be confuigured this way:
> acl PURGE method purge
> acl localhost src 127.0.0.1
> http_access allow purge localhost
> http_access deny purge

> BUT they don't mention which command to use to purge it (they only
> provide command how to purge specific record)

You cannot purge the whole cache. The actual URL for each object in the
cachge is only stored in the object itself, not in swap.state, the cache
"index".

When squid tries to find if a URL is in the cache, it applies a hash
function to the URL. It then looks up the result of the hash in its index.
If it exists, it then checks that the URL requested is the same as what's
in the cache object referencd by the index. This caters for two URLs
hashing to the same value. So, there is no direct tie from URL to cache
object and therefore no way to purge anytyhing other than a single URL.

There are ways of deleting the entire cache (or parts of it) described
in the FAQ at www.squid-cache.org. A search of the mailing list archives
at the same site will probably give help on deleting sets of URLs (eg
everything from one site).

Colin
Received on Tue Jul 17 2001 - 17:09:56 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:09 MST