On Tue, 25 Nov 2003, Nimesh Shah wrote:

> How does Squid handle multiple request for same resource at the same 
> time on its cache when it can not serve from cache? 

Depends on timing and if the response is cachable or not. If the response 
is cachable then requests arriving after Squid has received the response 
headers (required to determine that the response is cachable) will join 
the same request, getting the content from the already running request.

Requests arriving before this will initiate new requests for the object.

> If it does update (the cache) every such response (which will be same) 
> from origin server, how does it handle this (or to put it other way,
> is there locking or lock management in Squid)?

There is atomic replaces of the object cached on a URL, and the objects as
such are reference counted. If a cached object gets replaced by a newer
copy then the old object stays around as long as there is active
references to it, but any new requests will only see the new object.

Regards
Henrik

Reply via email to