Fwd: Re: hi

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 21 Apr 2002 09:46:59 +0200

---------- Forwarded Message ----------

Subject: Re: hi
Date: Sun, 21 Apr 2002 09:46:39 +0200
From: Henrik Nordstrom <hno@squid-cache.org>
To: Songqing Chen <sqchen@cs.wm.edu>

On Sunday 21 April 2002 00:15, Songqing Chen wrote:
> My question is : each time the object is written to the disk, is a
> new file number allocated? ( It seems so from the
> "storeDirMapAllocate()", but what if a proxy already has a copy of
> this object? )

Yes.

The old gets released when there no longer is any users currently
reading from it.

> My question comes from the user performing the "Reload" action. To
> satisfy a user's reload action, the proxy gets a new copy of the
> requested document from the origin server no matter if the proxy
> has a valid document copy or not, and then how does the proxy save
> the new copy locally without conflicts? or how to fresh its cached
> copy? I suppose the old one is replaced, but I did not find the
> code to do this.

See storeSetPublicKey, it also makes the older copy private, which
will cause it to automatically get released when there is no users
(see storeSetPrivateKey).

Note that this only happens if the reload caused a new copy to be
downloaded. Most reload requests are just forced IMS queries.

Regards
Henrik

-------------------------------------------------------
Received on Sun Apr 21 2002 - 02:30:22 MDT

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