Re: [squid-users] swap.state question

From: Duane Wessels <>
Date: Fri, 27 Feb 2004 15:58:39 -0700 (MST)

On Fri, 27 Feb 2004, OTR Comm wrote:

> Hello,
> Could someone explain the relationship between the swap.state file and
> the actual files in the L2 directories?
> Is the swap.state a database where Squid does it's cache checking and
> the L2 directory files where the data is presented from?
> Also, if one of the cache files is deleted, does the swap.state maintain
> information about that file?
> I am trying to understand how purging items from the cache works, and
> realize that has to be some relationship between swap.state and the L2
> files, but I looked in the code for client.c (ver 2.5) and
> (ver 3.0) and can not figure out where swap.state or the L2 files are
> addressed.

For each cache file (in the L2 directories) there is an entry in
the swap.state file.

Squid reads the swap.state files when it starts to up know what objects
are cached on disk and where.

If you manually remove a cache file, Squid won't know about it until
it tries to read the file for a cache hit. Then it will get a
"swapin error" and forward the request to the origin server, causing
a cache miss.

Received on Fri Feb 27 2004 - 16:23:51 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:03 MST