W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2001

unlocking of cache objects

From: Jens Meggers <jens.meggers@firepad.com>
Date: Sun, 25 Mar 2001 14:50:03 -0800
Message-ID: <DDF913B74F07D411B22500B0D0206D9F185476@FIREPLUG>
To: "'www-lib@w3.org'" <www-lib@w3.org>
Hi,

I found a problem with unlocking of cache objects. I understand that a cache
obeject gets locked when it is used an unlocked when unused. However, that
does only happen when no cache hit occurs.
To verify that, try the following. Load an the same url 2 times. The first
time, a cache object gets generated, locked and unlocked when finished. The
second time, it get locked because of the cache hit. In the after filter in
HTCache.c, HTCacheUpdateFilter() the object is finally loaded from the cache
file:

	/*
	**  Start request directly from the cache. As with the redirection
filter
	**  we reuse the same request object which means that we must
	**  keep this around until the cache load request has terminated
	**  In the case of a 
	*/
	HTLoad(request, YES);

I cannot find a cache unlock command in that sequence. The debugger also
tells me that the cache object is still locked. Is that done by purpose?

There also might be an issue with that because the context of the new
request HTLoad sequence is not aware of the fact that it loads from a locked
cache object. Having that in mind, it might become difficult to release the
cache lock in one of the after filters of the request without attaching the
cache object itself to the request object.

What do you think?

Regards,

Jens
Received on Sunday, 25 March 2001 18:00:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:39 GMT