Re: Storage Interface for squid

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 3 Jun 2002 10:48:55 +0200

On Monday 03 June 2002 02:33, Meghna Dhar wrote:
> Thanks once again, Henrik.
> Actually, I am not using this scheme in my implementation. I just
> wanted to write a system (using the squid scheme), so that I could
> compare my system with Squid.

Good.

> One more question .... when I get a Url request, the only thing
> that is unique about it is its MD5 ... right ??? Then how does
> Squid give it a file number (int)?

The store implementation does, and then calls the file_callback. See
storeCreate() / createobj.

In the "ufs" familiy of stores the swafile number is allocated via a
bitmap. See storeUfsDirMapBitAllocate(). Basically starting at the
last allocated + 1, returning the next free number.

> Or is it the other way ?? The directories are first selected(based
> on least load and round robin) and then the file numbers are given
> accordingly .

The cache_dir is first selected based on the policy set by
store_dir_select_algorithm (current policies are least-load and
round-robin), then the store implementation of that specific
cache_dir assigns the number within that store while the object is
being stored.

Ps. Please keep squid-dev in the CC list.

Regards
Henrik
Received on Mon Jun 03 2002 - 03:12:05 MDT

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