1.2b8: Disk based URL [preleminary patch]

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 28 Dec 1997 07:41:17 +0100

--MimeMultipartBoundary
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am thinking about what we can do to validate the consistency of the
cache, and a vital part is to save some internal information inside the
actual swap object.

We should store the metadata not available in the headers as well as the
actual object (headers + body). This metadata includes the URL and
actual timestamp when the object was stored. This is probably best done
as a one-line header at the start of the swap-file.

I implemented a small patch to 1.2b8 that does this. It is very crude
but allows us to play with the idea. The patch currently stores a simple
header in the format
SQUID/1.0 timestamp size method URL
and skips the header on swapin.

The tag (SQUID/1.0) is used to
1. Identify that this file have a Squid header
2. Includes a version, to allow future upgrades/additions in a somewhat
reliable manner...

In the future we should check that the URL is what we think it is when
we swap-in a object from disk. The disk-based URL can be used in
hit-metering as well. As we said before there is no need to have the URL
in memory when using SHA or MD5 as store key.

Hmm.. when thinking about this a bit more, I have made the conculsion
that this should probably not be done in this way. The metadata should
instead be saved as internal HTTP headers, and filtered before delivered
to the client.

* Slow rebuilds needs to know the actual file size, as well as the HTTP
object size.
* More structured processing of the information
* The filter code is already there

/Henrik

--MimeMultipartBoundary--
Received on Tue Jul 29 2003 - 13:15:45 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:31 MST